src/lapistano/ProxyObject/Generator.php
protected static function generateProxiedMethodDefinition($templateDir, \ReflectionMethod $method)
    {
        $reference = '';

        if ($method->returnsReference()) {
            $reference = '&';
        }

        $template = self::createTemplateObject(
            $templateDir . 'proxied_method.tpl'
        );

        $template->setVar(
            array(
                'arguments_declaration' => self::getArgumentDeclaration($method),
                'arguments' => self::getMethodCallParameters($method),
                'method_name' => $method->getName(),
                'reference' => $reference
            )
        );

        return $template->render();
    }
protected static function generateProxiedMethodDefinition($templateDir, \ReflectionMethod $method)
    {
        $reference = '';

        if ($method->returnsReference()) {
            $reference = '&';
        }

        $template = self::createTemplateObject(
            $templateDir . 'proxied_method.tpl'
        );

        $template->setVar(
            array(
                'arguments_declaration' => self::getArgumentDeclaration($method),
                'arguments' => self::getMethodCallParameters($method),
                'method_name' => $method->getName(),
                'reference' => $reference
            )
        );

        return $template->render();
    }
Generates the definition of a method to be proxied.

@param string            $templateDir Location of the templates to be used to create the proxy.
@param \ReflectionMethod $method      Name of the method to be reflected.

@return array Information about the method to be proxied.