public function toArray()
    {
        $methods = array();
        foreach ($this->getMethods() as $key => $method) {
            $methods[$key] = $method->toArray();
        }
        return $methods;
    }
public function toArray()
    {
        $methods = array();
        foreach ($this->getMethods() as $key => $method) {
            $methods[$key] = $method->toArray();
        }
        return $methods;
    }
public function toArray ( ) { $ methods = array ( ) ; foreach ( $ this -> getMethods ( ) as $ key => $ method ) { $ methods [ $ key ] = $ method -> toArray ( ) ; } return $ methods ; }
Cast definition to an array

@return array
Cast definition to an array