public function toArray()
    {
        $array = [
            'name'      => $this->getName(),
            'arguments' => $this->getArguments(),
            'children'  => array()
        ];

        foreach ($this->children as $child) {
            $array['children'][] = $child->toArray();
        }
        return $array;
    }
public function toArray()
    {
        $array = [
            'name'      => $this->getName(),
            'arguments' => $this->getArguments(),
            'children'  => array()
        ];

        foreach ($this->children as $child) {
            $array['children'][] = $child->toArray();
        }
        return $array;
    }
public function toArray ( ) { $ array = [ 'name' => $ this -> getName ( ) , 'arguments' => $ this -> getArguments ( ) , 'children' => array ( ) ] ; foreach ( $ this -> children as $ child ) { $ array [ 'children' ] [ ] = $ child -> toArray ( ) ; } return $ array ; }
Get the array representation of the Token

@return array
Get the array representation of the Token