コード例 #1
0
ファイル: Fluent.php プロジェクト: recca0120/laravel-support
 public function __construct($fileinfo)
 {
     if ($fileinfo instanceof SplFileInfo === false) {
         $fileinfo = new SplFileInfo($fileinfo);
     }
     parent::__construct($this->parseFileInfo($fileinfo));
     $this->fileinfo = $fileinfo;
 }
コード例 #2
0
 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);
 }
コード例 #3
0
 /**
  * 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);
 }
コード例 #4
0
 /**
  * {@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);
 }
コード例 #5
0
ファイル: Theme.php プロジェクト: yajra/cms-themes
 /**
  * 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);
 }
コード例 #6
0
ファイル: FluentParameters.php プロジェクト: yajra/cms-core
 /**
  * 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;
     }
 }
コード例 #7
0
 /**
  * @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);
 }
コード例 #8
0
ファイル: Message.php プロジェクト: ArAcNiDe/laravel-selfsms
 /**
  * @param SelfSMSProvider $provider Base provider
  * @param array $options Preset options
  */
 public function __construct(SelfSMSProvider $provider, $options = [])
 {
     parent::__construct($options);
     $this->provider = $provider;
 }
コード例 #9
0
ファイル: Status.php プロジェクト: endyjasmi/neo4j
 /**
  * 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);
 }
コード例 #10
0
ファイル: Column.php プロジェクト: thesaputra/xyz-prx
 /**
  * @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);
 }
コード例 #11
0
ファイル: Field.php プロジェクト: illuminate3/larastaller
 public function __construct(array $attributes = [])
 {
     parent::__construct($attributes);
 }
コード例 #12
0
ファイル: Entity.php プロジェクト: xpressengine/xpressengine
 /**
  * Constructor
  *
  * @param array $attributes attributes
  */
 public function __construct($attributes = [])
 {
     parent::__construct($attributes);
     $this->syncOriginal();
 }
コード例 #13
0
ファイル: Settings.php プロジェクト: BibleBowl/account
 public function __construct($attributes = [])
 {
     if ($attributes !== null) {
         parent::__construct($attributes);
     }
 }
コード例 #14
0
ファイル: Item.php プロジェクト: codexproject/core
 /**
  * BaseWidget constructor.
  *
  * @param $id
  */
 public function __construct($id, $attr = [])
 {
     parent::__construct($attr);
     $this->id = $id;
 }
コード例 #15
0
ファイル: Event.php プロジェクト: dangreaves/slackbot
 public function __construct(ApiClient $client, Payload $payload)
 {
     $this->client = $client;
     parent::__construct($payload->getData());
 }