public function __construct($fileinfo) { if ($fileinfo instanceof SplFileInfo === false) { $fileinfo = new SplFileInfo($fileinfo); } parent::__construct($this->parseFileInfo($fileinfo)); $this->fileinfo = $fileinfo; }
public function __construct($data) { $steamID = isset($data['steamid']) ? $data['steamid'] : null; unset($data['steamid']); parent::__construct($data); $this->attributes['steamID64'] = $steamID; $this->attributes['steamID'] = $this->getSteamID($steamID); }
/** * Sets attributes from response xml. * * @param ResponseInterface $response * @param array $attributes */ public function __construct(ResponseInterface $response, array $attributes = null) { $this->response = $response; if (is_null($attributes)) { $attributes = Xml::elementsToArray($response->xml()->xpath('/RESPONSE/FIELDS/*')); } parent::__construct($attributes); }
/** * {@inheritdoc} */ public function __construct($attributes) { // Default attributes if (is_string($attributes)) { $attributes = ['command' => $attributes, 'status' => null, 'output' => null, 'done' => false]; } parent::__construct($attributes); $this->sanitized = $this->sanitizeCommand($this->command); }
/** * Theme constructor. * * @param string $name * @param string $theme * @param string $type * @param string $version * @param string $description * @param array $positions * @param array|object $attributes */ public function __construct($name, $theme, $type, $version, $description, array $positions, $attributes = []) { $this->name = $name; $this->theme = $theme; $this->type = $type; $this->version = $version; $this->description = $description; $this->positions = $positions; parent::__construct($attributes); }
/** * FluentParameters constructor. * * @param array|object $attributes */ public function __construct($attributes) { parent::__construct($attributes); if (isset($attributes['templates']) && is_array($attributes['templates'])) { $templates = new Collection(); foreach ($attributes['templates'] as $template) { $templates->push(new Fluent($template)); } $this->templates = $templates; } }
/** * @param array $attributes */ public function __construct($attributes = []) { $attributes['orderable'] = isset($attributes['orderable']) ? $attributes['orderable'] : true; $attributes['searchable'] = isset($attributes['searchable']) ? $attributes['searchable'] : true; // Allow methods override attribute value foreach ($attributes as $attribute => $value) { $method = 'parse' . ucfirst(strtolower($attribute)); if (method_exists($this, $method)) { $attributes[$attribute] = $this->{$method}($value); } } parent::__construct($attributes); }
/** * @param SelfSMSProvider $provider Base provider * @param array $options Preset options */ public function __construct(SelfSMSProvider $provider, $options = []) { parent::__construct($options); $this->provider = $provider; }
/** * Status constructor * * @param ResultInterface $result Result instance * @param array $status Status array */ public function __construct(ResultInterface $result, array $status) { $this->setResult($result); parent::__construct($status); }
/** * @param array $attributes */ public function __construct($attributes = []) { $attributes['orderable'] = isset($attributes['orderable']) ? $attributes['orderable'] : true; $attributes['searchable'] = isset($attributes['searchable']) ? $attributes['searchable'] : true; parent::__construct($attributes); }
public function __construct(array $attributes = []) { parent::__construct($attributes); }
/** * Constructor * * @param array $attributes attributes */ public function __construct($attributes = []) { parent::__construct($attributes); $this->syncOriginal(); }
public function __construct($attributes = []) { if ($attributes !== null) { parent::__construct($attributes); } }
/** * BaseWidget constructor. * * @param $id */ public function __construct($id, $attr = []) { parent::__construct($attr); $this->id = $id; }
public function __construct(ApiClient $client, Payload $payload) { $this->client = $client; parent::__construct($payload->getData()); }