public function arrayToFunctionElement(array $definition)
    {
        $function = new Functions;
        if (isset($definition['docblock'])) {
            $docblock = $this->arrayToDocblockElement($definition['docblock']);
            $function->setDocbloc($docblock);
        }
        if (isset($definition['public'])) {
            $function->isPublic(true);
        }
        if (isset($definition['name'])) {
            $function->setName($definition['name']);
        }
        if (isset($definition['params'])) {
            foreach ($definition['params'] as $name => $type) {
                $function->addParam($name, $type);
            }
        }
        if (isset($definition['content'])) {
            $function->setContent($definition['content']);
        }
        return $function;
    }
public function arrayToFunctionElement(array $definition)
    {
        $function = new Functions;
        if (isset($definition['docblock'])) {
            $docblock = $this->arrayToDocblockElement($definition['docblock']);
            $function->setDocbloc($docblock);
        }
        if (isset($definition['public'])) {
            $function->isPublic(true);
        }
        if (isset($definition['name'])) {
            $function->setName($definition['name']);
        }
        if (isset($definition['params'])) {
            foreach ($definition['params'] as $name => $type) {
                $function->addParam($name, $type);
            }
        }
        if (isset($definition['content'])) {
            $function->setContent($definition['content']);
        }
        return $function;
    }
public function arrayToFunctionElement ( array $ definition ) { $ function = new Functions ; if ( isset ( $ definition [ 'docblock' ] ) ) { $ docblock = $ this -> arrayToDocblockElement ( $ definition [ 'docblock' ] ) ; $ function -> setDocbloc ( $ docblock ) ; } if ( isset ( $ definition [ 'public' ] ) ) { $ function -> isPublic ( true ) ; } if ( isset ( $ definition [ 'name' ] ) ) { $ function -> setName ( $ definition [ 'name' ] ) ; } if ( isset ( $ definition [ 'params' ] ) ) { foreach ( $ definition [ 'params' ] as $ name => $ type ) { $ function -> addParam ( $ name , $ type ) ; } } if ( isset ( $ definition [ 'content' ] ) ) { $ function -> setContent ( $ definition [ 'content' ] ) ; } return $ function ; }
Returns well formated function declaration

@param array $definition Functions definition

@return Deflection\Element\Functions
Returns well formated function declaration