/** * Constructor * * @param array $params */ public function __construct(array $params) { if (isset($params['depth'])) { $this->depth = $params['depth']; unset($params['depth']); } parent::__construct($params); }
/** * Constructor * * @param array $params */ public function __construct(array $params) { if (array_key_exists('depth', $params)) { $this->depth = $params['depth']; unset($params['depth']); } parent::__construct($params); }