public function __construct() { if (empty($this->id)) { $this->id = strtolower((new \ReflectionClass($this))->getShortName()); } if (empty($this->label)) { $this->id = (new \ReflectionClass($this))->getShortName(); } parent::__construct(); }
public function __construct($config = []) { parent::__construct($config); register_shutdown_function(function () { if ($this->_promises) { if (function_exists('\\fastcgi_finish_request')) { \fastcgi_finish_request(); } P\inspect_all($this->_promises); } }); }
/** * CreateImageBehavior constructor. * @param BaseName $name name generator * @param CreateImageInterface $imageCreator image resizer * @param array $config */ public function __construct(BaseName $name, CreateImageInterface $imageCreator, $config = array()) { parent::__construct($config); $this->name = $name; $this->imageCreator = $imageCreator; }
/** * Instance constructor. * * @param array $config */ public function __construct($config = []) { if (array_key_exists('defaultWorkflowId', $config)) { if (is_string($config['defaultWorkflowId'])) { $this->_defaultWorkflowId = $config['defaultWorkflowId']; } else { throw new InvalidConfigException("Invalid property Type : 'defaultWorkflowId' must be a string"); } unset($config['defaultWorkflowId']); } parent::__construct($config); }
function __construct() { parent::__construct(); self::checkImageDir(); }