本文整理汇总了PHP中Wire::__get方法的典型用法代码示例。如果您正苦于以下问题:PHP Wire::__get方法的具体用法?PHP Wire::__get怎么用?PHP Wire::__get使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Wire
的用法示例。
在下文中一共展示了Wire::__get方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __get
public function __get($key)
{
if ($key == 'delimiter') {
return $this->delimeter;
}
// @todo learn how to spell
return parent::__get($key);
}
示例2: __get
public function __get($key)
{
$value = $this->get($key);
if (is_null($value)) {
$value = parent::__get($key);
}
return $value;
}
示例3: __get
public function __get($key)
{
if ($key == 'pdo') {
return $this->pdo;
}
return parent::__get($key);
}
示例4: __get
/**
* Handle non-function versions of some properties
*
*/
public function __get($key)
{
if ($key == 'path') {
return $this->path();
}
if ($key == 'url') {
return $this->url();
}
if ($key == 'page') {
return $this->page;
}
return parent::__get($key);
}
示例5: __get
/**
* Return a fuel or other property set to the Pages instance
*
*/
public function __get($key)
{
if ($key == 'outputFormatting') {
return $this->outputFormatting;
}
if ($key == 'cloning') {
return $this->cloning;
}
return parent::__get($key);
}
示例6: get
/**
* Provides direct reference access to retrieve values in the $data array
*
* If the given $key is an object, it will cast it to a string.
* If the given key is a strain with "|" pipe characters in it, it will try all till it finds a value.
*
* @param string|object $key
* @return mixed|null Returns null if the key was not found.
*
*/
public function get($key)
{
if (is_object($key)) {
$key = "{$key}";
}
if (array_key_exists($key, $this->data)) {
return $this->data[$key];
}
if (strpos($key, '|')) {
$keys = explode('|', $key);
foreach ($keys as $k) {
if ($value = $this->get($k)) {
return $value;
}
}
}
return parent::__get($key);
// back to Wire
}
示例7: __get
/**
* Return a fuel or other property set to the Pages instance
*
*/
public function __get($key)
{
return parent::__get($key);
}
示例8: __get
/**
* Enables derefencing of WireArray elements in object notation.
*
* Example: $myArray->myElement
* Not applicable to numerically indexed arrays.
* Fuel properties and hooked properties have precedence with this type of call.
*
* @param int|string $property
* @return mixed Value of requested index, or false if it doesn't exist.
*
*/
public function __get($property)
{
$value = parent::__get($property);
if (is_null($value)) {
$value = $this->getProperty($property);
}
if (is_null($value)) {
$value = $this->get($property);
}
return $value;
}
示例9: __get
public function __get($key)
{
return isset($this->data[$key]) ? $this->data[$key] : parent::__get($name);
}