src/Weaver/ImplementWeaveGenerator.php
function addPlainMethod(MethodReflection $sourceMethod) {

        $parameters = $sourceMethod->getParameters();
        $paramArray = [];
        foreach ($parameters as $parameter) {
            $paramArray[] = '$'.$parameter->getName();
        }

        $paramList = implode(', ', $paramArray);

        $weavedMethod = MethodGenerator::fromReflection($sourceMethod);

        $body = sprintf(
            " return \$this->%s->%s(%s);",
            $this->implementWeaveInfo->getInstancePropertyName(),
            $sourceMethod->getName(),
            $paramList
        );
        
        $weavedMethod->setBody($body);
        $this->generator->addMethodFromGenerator($weavedMethod);
    }
function addPlainMethod(MethodReflection $sourceMethod) {

        $parameters = $sourceMethod->getParameters();
        $paramArray = [];
        foreach ($parameters as $parameter) {
            $paramArray[] = '$'.$parameter->getName();
        }

        $paramList = implode(', ', $paramArray);

        $weavedMethod = MethodGenerator::fromReflection($sourceMethod);

        $body = sprintf(
            " return \$this->%s->%s(%s);",
            $this->implementWeaveInfo->getInstancePropertyName(),
            $sourceMethod->getName(),
            $paramList
        );
        
        $weavedMethod->setBody($body);
        $this->generator->addMethodFromGenerator($weavedMethod);
    }
function addPlainMethod ( MethodReflection $ sourceMethod ) { $ parameters = $ sourceMethod -> getParameters ( ) ; $ paramArray = [ ] ; foreach ( $ parameters as $ parameter ) { $ paramArray [ ] = '$' . $ parameter -> getName ( ) ; } $ paramList = implode ( ', ' , $ paramArray ) ; $ weavedMethod = MethodGenerator :: fromReflection ( $ sourceMethod ) ; $ body = sprintf ( " return \$this->%s->%s(%s);" , $ this -> implementWeaveInfo -> getInstancePropertyName ( ) , $ sourceMethod -> getName ( ) , $ paramList ) ; $ weavedMethod -> setBody ( $ body ) ; $ this -> generator -> addMethodFromGenerator ( $ weavedMethod ) ; }
Add a call to the instance method.
@param MethodReflection $sourceMethod
Add a call to the instance method .