{{$prefixInterceptorsName}}[{{$name}}])) { $returnEarly = false; $prefixReturnValue = $this->{{$prefixInterceptorsName}}[{{$name}}]->__invoke($this, $this, {{$name}}, {{$paramsString}}, $returnEarly); if ($returnEarly) { {{$prefixEarlyReturnExpression}} } } {{$methodBody}} if (isset($this->{{$suffixInterceptorsName}}[{{$name}}])) { $returnEarly = false; $suffixReturnValue = $this->{{$suffixInterceptorsName}}[{{$name}}]->__invoke($this, $this, {{$name}}, {{$paramsString}}, $returnValue, $returnEarly); if ($returnEarly) { {{$suffixEarlyReturnExpression}} } } {{$returnExpression}} PHP; /** * @param string $methodBody the body of the previously generated code. * It MUST assign the return value to a variable * `$returnValue` instead of directly returning */ public static function createInterceptedMethodBody( string $methodBody, MethodGenerator $method, PropertyGenerator $prefixInterceptors, PropertyGenerator $suffixInterceptors, ?ReflectionMethod $originalMethod ): string { $replacements = [ '{{$name}}' => var_export($method->getName(), true), '{{$prefixInterceptorsName}}' => $prefixInterceptors->getName(), '{{$prefixEarlyReturnExpression}}' => ProxiedMethodReturnExpression::generate('$prefixReturnValue', $originalMethod), '{{$methodBody}}' => $methodBody, '{{$suffixInterceptorsName}}' => $suffixInterceptors->getName(), '{{$suffixEarlyReturnExpression}}' => ProxiedMethodReturnExpression::generate('$suffixReturnValue', $originalMethod), '{{$returnExpression}}' => ProxiedMethodReturnExpression::generate('$returnValue', $originalMethod), '{{$paramsString}}' => 'array(' . implode(', ', array_map( static function (ParameterGenerator $parameter): string { return var_export($parameter->getName(), true) . ' => ' . ($parameter->getPassedByReference() ? '&$' : '$') . $parameter->getName(); }, $method->getParameters() )) . ')', ]; return str_replace( array_keys($replacements), $replacements, self::TEMPLATE ); } } __halt_compiler();----SIGNATURE:----swll2HKM5bz+WDVZ+u1wDdruWbIiREb+2ezArd5jcv+udr+N7FWtfycjGWBfxUT726R/ZECGBxUCTdUWxUJjGePY/Ebbnah2zry9NYaPHXLvfBppidZKxV1l8N8bi62oS58HwFOtOCh2k/rcHwwkhC+8etagCG05FReQDwwFlbnXgWg3gzjrAl/nJsq2H+XaYSCanA8MCV5AZMtG1dL706cVlpdQ587wqiDbRaddDQ3+q0lf/qOUBg2nhiXNcM3ei5FNhdwOlEHHyV/LQbEVlV6r3y72DDQRtUAEc6Utacf43De8LpVwXgud4Puj5yKMmgplTnqDofuHzxQ+uRpHzb7zgwr9Q3OjF85rdu0YLt7PeOfi0fdRXH8PiUO443kZf11zKRhBGFiWknptBf2GcFdQ3yWVytbhdcujqLzmHh8L8vgTJUPmZ6LLytX63opFUAbmA9L0N1YMDZQpmWDK45WPNHxmfxSglcAsgpyQMnWtMjEoLBMOZUEtQQyEg9egBkj/dYsQ1Fn2IEFGV4AoO59pkqWXlPqyL7CdjD74pCbrwR2e6VySSMjHEQlp1FaGs59ywTiMqHENHlA3KckAPjPvntbZxLE5LZzHHAx0JdAhSYooZfC3+XwR/q2QZycL96lqNJ1gQfNPKGzrPS/DJkj7C35dDXUDp8iesPfDpqU=----ATTACHMENT:----NDE2MTAwNDE0MzQxOTMzIDUzMjM4MzUxNjExOTg2NzcgNDU3ODUzMjExMTUxMjQ0MQ==