Go\Instrument\Transformer\BaseSourceTransformer::__construct PHP Method

__construct() public method

Default constructor for transformer
public __construct ( AspectKernel $kernel, array $options = [] )
$kernel Go\Core\AspectKernel Instance of aspect kernel
$options array Custom options or kernel options
    public function __construct(AspectKernel $kernel, array $options = [])
    {
        $this->kernel = $kernel;
        $this->container = $kernel->getContainer();
        $this->options = $options ?: $kernel->getOptions();
    }

Usage Example

 /**
  * Constructs a weaving transformer
  *
  * @param AspectKernel $kernel Instance of aspect kernel
  * @param Broker $broker Instance of reflection broker to use
  * @param AdviceMatcher $matcher Advice matcher for class
  * @param AspectLoader $loader Loader for aspects
  */
 public function __construct(AspectKernel $kernel, Broker $broker, AdviceMatcher $matcher, AspectLoader $loader)
 {
     parent::__construct($kernel);
     $this->broker = $broker;
     $this->adviceMatcher = $matcher;
     $this->aspectLoader = $loader;
 }
All Usage Examples Of Go\Instrument\Transformer\BaseSourceTransformer::__construct
BaseSourceTransformer