public function toArray()
    {
        $type = $this->getType();
        $array = array(
            'type' => $type,
        );
        if ('function' == $type) {
            $array['function'] = $this->getFunction();
        } else {
            $array['class']  = $this->getClass();
            $array['method'] = $this->getMethod();
        }
        return $array;
    }
public function toArray()
    {
        $type = $this->getType();
        $array = array(
            'type' => $type,
        );
        if ('function' == $type) {
            $array['function'] = $this->getFunction();
        } else {
            $array['class']  = $this->getClass();
            $array['method'] = $this->getMethod();
        }
        return $array;
    }
public function toArray ( ) { $ type = $ this -> getType ( ) ; $ array = array ( 'type' => $ type , ) ; if ( 'function' == $ type ) { $ array [ 'function' ] = $ this -> getFunction ( ) ; } else { $ array [ 'class' ] = $ this -> getClass ( ) ; $ array [ 'method' ] = $ this -> getMethod ( ) ; } return $ array ; }
Cast callback to array

@return array
Cast callback to array