Go\Proxy\AbstractProxy::__construct PHP Méthode

__construct() public méthode

Constructs an abstract proxy class
public __construct ( array $advices = [] )
$advices array List of advices
    public function __construct(array $advices = [])
    {
        $this->advices = $this->flattenAdvices($advices);
    }

Usage Example

Exemple #1
0
 /**
  * Constructs functions stub class from namespace Reflection
  *
  * @param ReflectionFileNamespace $namespace Reflection of namespace
  * @param array $advices List of function advices
  *
  * @throws \InvalidArgumentException for invalid classes
  */
 public function __construct(ReflectionFileNamespace $namespace, array $advices = [])
 {
     parent::__construct($advices);
     $this->namespace = $namespace;
     if (empty($advices[AspectContainer::FUNCTION_PREFIX])) {
         return;
     }
     foreach ($advices[AspectContainer::FUNCTION_PREFIX] as $pointName => $value) {
         $function = new ReflectionFunction($pointName);
         $this->override($function, $this->getJoinpointInvocationBody($function));
     }
 }
All Usage Examples Of Go\Proxy\AbstractProxy::__construct