public function getMethods($filter = null)
    {
        if ($this->methods === null) {
            // lazy load class methods list
            $this->methods = array();
            foreach ($this->node->stmts as $stmt) {
                if ($stmt instanceof Node\Stmt\ClassMethod) {
                    $stmt->setAttribute('fileName', $this->getFileName());
                    $this->methods[$stmt->name] = new MethodModel($this, $stmt);
                }
            }
        }

        if (isset($filter)) {
            // @TODO must implement the filter feature
            $methods =& $this->methods;
        } else {
            $methods =& $this->methods;
        }

        return array_values($methods);
    }
public function getMethods($filter = null)
    {
        if ($this->methods === null) {
            // lazy load class methods list
            $this->methods = array();
            foreach ($this->node->stmts as $stmt) {
                if ($stmt instanceof Node\Stmt\ClassMethod) {
                    $stmt->setAttribute('fileName', $this->getFileName());
                    $this->methods[$stmt->name] = new MethodModel($this, $stmt);
                }
            }
        }

        if (isset($filter)) {
            // @TODO must implement the filter feature
            $methods =& $this->methods;
        } else {
            $methods =& $this->methods;
        }

        return array_values($methods);
    }
public function getMethods ( $ filter = null ) { if ( $ this -> methods === null ) { // lazy load class methods list $ this -> methods = array ( ) ; foreach ( $ this -> node -> stmts as $ stmt ) { if ( $ stmt instanceof Node \ Stmt \ ClassMethod ) { $ stmt -> setAttribute ( 'fileName' , $ this -> getFileName ( ) ) ; $ this -> methods [ $ stmt -> name ] = new MethodModel ( $ this , $ stmt ) ; } } } if ( isset ( $ filter ) ) { // @TODO must implement the filter feature $ methods = & $ this -> methods ; } else { $ methods = & $ this -> methods ; } return array_values ( $ methods ) ; }
Gets an array of methods.

@param int $filter Filter the results to include only methods with certain attributes.
Defaults to no filtering.

@return array An array of MethodModel objects reflecting each method.
Gets an array of methods .