public function __construct($className, $type, array $advices)
{
$this->class = new ReflectionClass($className);
$this->constructor = $constructor = $this->class->getConstructor();
// Give an access to call protected constructor
if ($constructor && $constructor->isProtected()) {
$constructor->setAccessible(true);
}
if ($constructor) {
$this->constructorArguments = $constructor->getNumberOfParameters();
}
parent::__construct($advices);
}