protected function createMethod(\ReflectionMethod $method)
    {
        $visibility = '';
        $additional = '';
        $name = $method->getName();
        if ($method->isPublic()) {
            $visibility = ' public';
        } else if ($method->isProtected()) {
            $visibility = ' protected';
        } else if ($method->isPrivate()) {
            // useless really. $visibility = ' private';
            return '';
        }
        if ($method->isStatic()) {
            // useless really. $additional .= ' static ';
            return '';
        }
        //if ($method->isAbstract()) {
            // useless really. $$additional .= ' abstract ';
            //return '';
        //}
        if ($method->isConstructor()) {
            $name = '__construct';
        } else if ($method->isDestructor()) {
            $name = '__destruct';
        }
        $args = array();
        foreach ($method->getParameters() as $parameter) {
            $args[] = $this->createParameter($parameter);
        }

        $src = $this->methodTemplate;
        $src = str_replace('VISIBILITY', $visibility, $src);
        $src = str_replace('ADDITIONAL', $additional, $src);
        $src = str_replace('METHOD_NAME', $name, $src);
        $src = str_replace('METHOD_ARGS', implode(',', $args), $src);
        $src = str_replace(
        	'CLASS_NAME', $method->getDeclaringClass()->getName(), $src
        );
        return $src;
    }
protected function createMethod(\ReflectionMethod $method)
    {
        $visibility = '';
        $additional = '';
        $name = $method->getName();
        if ($method->isPublic()) {
            $visibility = ' public';
        } else if ($method->isProtected()) {
            $visibility = ' protected';
        } else if ($method->isPrivate()) {
            // useless really. $visibility = ' private';
            return '';
        }
        if ($method->isStatic()) {
            // useless really. $additional .= ' static ';
            return '';
        }
        //if ($method->isAbstract()) {
            // useless really. $$additional .= ' abstract ';
            //return '';
        //}
        if ($method->isConstructor()) {
            $name = '__construct';
        } else if ($method->isDestructor()) {
            $name = '__destruct';
        }
        $args = array();
        foreach ($method->getParameters() as $parameter) {
            $args[] = $this->createParameter($parameter);
        }

        $src = $this->methodTemplate;
        $src = str_replace('VISIBILITY', $visibility, $src);
        $src = str_replace('ADDITIONAL', $additional, $src);
        $src = str_replace('METHOD_NAME', $name, $src);
        $src = str_replace('METHOD_ARGS', implode(',', $args), $src);
        $src = str_replace(
        	'CLASS_NAME', $method->getDeclaringClass()->getName(), $src
        );
        return $src;
    }
protected function createMethod ( \ ReflectionMethod $ method ) { $ visibility = '' ; $ additional = '' ; $ name = $ method -> getName ( ) ; if ( $ method -> isPublic ( ) ) { $ visibility = ' public' ; } else if ( $ method -> isProtected ( ) ) { $ visibility = ' protected' ; } else if ( $ method -> isPrivate ( ) ) { // useless really. $visibility = ' private'; return '' ; } if ( $ method -> isStatic ( ) ) { // useless really. $additional .= ' static '; return '' ; } //if ($method->isAbstract()) { // useless really. $$additional .= ' abstract '; //return ''; //} if ( $ method -> isConstructor ( ) ) { $ name = '__construct' ; } else if ( $ method -> isDestructor ( ) ) { $ name = '__destruct' ; } $ args = array ( ) ; foreach ( $ method -> getParameters ( ) as $ parameter ) { $ args [ ] = $ this -> createParameter ( $ parameter ) ; } $ src = $ this -> methodTemplate ; $ src = str_replace ( 'VISIBILITY' , $ visibility , $ src ) ; $ src = str_replace ( 'ADDITIONAL' , $ additional , $ src ) ; $ src = str_replace ( 'METHOD_NAME' , $ name , $ src ) ; $ src = str_replace ( 'METHOD_ARGS' , implode ( ',' , $ args ) , $ src ) ; $ src = str_replace ( 'CLASS_NAME' , $ method -> getDeclaringClass ( ) -> getName ( ) , $ src ) ; return $ src ; }
This will return a full proxy-method source.

@param \ReflectionMethod $method The method to be proxied.

@see Proxy::$methodTemplate

@return string
This will return a full proxy - method source .