本文整理汇总了PHP中Illuminate\Support\Fluent::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP Fluent::__construct方法的具体用法?PHP Fluent::__construct怎么用?PHP Fluent::__construct使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Illuminate\Support\Fluent
的用法示例。
在下文中一共展示了Fluent::__construct方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
public function __construct($fileinfo)
{
if ($fileinfo instanceof SplFileInfo === false) {
$fileinfo = new SplFileInfo($fileinfo);
}
parent::__construct($this->parseFileInfo($fileinfo));
$this->fileinfo = $fileinfo;
}
示例2: __construct
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: __construct
/**
* 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: __construct
/**
* {@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: __construct
/**
* 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: __construct
/**
* 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: __construct
/**
* @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: __construct
/**
* @param SelfSMSProvider $provider Base provider
* @param array $options Preset options
*/
public function __construct(SelfSMSProvider $provider, $options = [])
{
parent::__construct($options);
$this->provider = $provider;
}
示例9: __construct
/**
* 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: __construct
/**
* @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: __construct
public function __construct(array $attributes = [])
{
parent::__construct($attributes);
}
示例12: __construct
/**
* Constructor
*
* @param array $attributes attributes
*/
public function __construct($attributes = [])
{
parent::__construct($attributes);
$this->syncOriginal();
}
示例13: __construct
public function __construct($attributes = [])
{
if ($attributes !== null) {
parent::__construct($attributes);
}
}
示例14: __construct
/**
* BaseWidget constructor.
*
* @param $id
*/
public function __construct($id, $attr = [])
{
parent::__construct($attr);
$this->id = $id;
}
示例15: __construct
public function __construct(ApiClient $client, Payload $payload)
{
$this->client = $client;
parent::__construct($payload->getData());
}