当前位置: 首页>>代码示例>>PHP>>正文


PHP Object::__get方法代码示例

本文整理汇总了PHP中yii\base\Object::__get方法的典型用法代码示例。如果您正苦于以下问题:PHP Object::__get方法的具体用法?PHP Object::__get怎么用?PHP Object::__get使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在yii\base\Object的用法示例。


在下文中一共展示了Object::__get方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: __get

 public function __get($property)
 {
     if ($this->isNestedProperty($property)) {
         return $this->getNestedProperty($property);
     }
     return parent::__get($property);
 }
开发者ID:tsamsiyu,项目名称:yii2-over,代码行数:7,代码来源:ModelBase.php

示例2: __get

 /**
  * (non-PHPdoc)
  * @see \yii\base\Object::__get()
  */
 public function __get($name)
 {
     if (in_array($name, $this->options)) {
         return $this->config->{$name};
     }
     return parent::__get($name);
 }
开发者ID:yurii-github,项目名称:yii2-mylib,代码行数:11,代码来源:Configuration.php

示例3: __get

 /**
  * Check whether we have a plugin installed with that name previous firing up the call
  *
  * @param string $name
  *
  * @return mixed|void
  */
 public function __get($name)
 {
     if (ArrayHelper::keyExists($name, $this->getInstalledPlugins())) {
         return $this->getPlugin($name);
     }
     return parent::__get($name);
 }
开发者ID:bariew,项目名称:yii2-google-maps-library,代码行数:14,代码来源:PluginManager.php

示例4: __get

 /**
  * @inheritdoc
  */
 public function __get($name)
 {
     if (array_key_exists($name, $this->_color)) {
         return $this->_color[$name];
     }
     return parent::__get($name);
 }
开发者ID:chenyongze,项目名称:yii2-qrcode-helper,代码行数:10,代码来源:RgbColor.php

示例5: __get

 public function __get($name)
 {
     if (isset($this->_user[$name])) {
         return $this->_user[$name];
     }
     return parent::__get($name);
 }
开发者ID:weiyiyi,项目名称:base,代码行数:7,代码来源:UserIdentity.php

示例6: __get

 /**
  * @inheritdoc
  */
 public function __get($name)
 {
     $config = $this->getFieldsConfig();
     if (isset($config[$name]) and is_array($config[$name])) {
         return $this->getField($name);
     }
     return parent::__get($name);
 }
开发者ID:frostiks25,项目名称:rzwebsys7,代码行数:11,代码来源:MetaFields.php

示例7: __get

 /**
  * PHP getter magic method.
  * This method is overridden so that service attributes can be accessed like properties.
  *
  * @param string $name property name.
  * @return mixed property value.
  * @see getAttribute
  */
 public function __get($name)
 {
     if ($this->hasAttribute($name)) {
         return $this->getAttribute($name);
     } else {
         return parent::__get($name);
     }
 }
开发者ID:fogunkoya,项目名称:yii2-eauth,代码行数:16,代码来源:ServiceBase.php

示例8: __get

 /**
  * Returns the value of a property.
  *
  * @param string $name the property name
  * @return mixed the property value
  * @throws UnknownPropertyException if the property is not defined
  */
 public function __get($name)
 {
     if (isset($this->_data[$name])) {
         return $this->_data[$name];
     } else {
         return parent::__get($name);
     }
 }
开发者ID:bitxseven,项目名称:yii2-big,代码行数:15,代码来源:ManagerObject.php

示例9: __get

 /**
  * Returns the value of an object property.
  *
  * Do not call this method directly as it is a PHP magic method that
  * will be implicitly called when executing `$value = $object->property;`.
  * @param string $name the property name
  * @return mixed the property value
  * @throws UnknownPropertyException if the property is not defined
  * @throws InvalidCallException if the property is write-only
  * @see __set()
  */
 public function __get($name)
 {
     if (property_exists($this->instance, $name)) {
         return $this->instance->{$name};
     }
     return parent::__get($name);
     // TODO: Change the autogenerated stub
 }
开发者ID:TeoChoi,项目名称:yii2-hashids,代码行数:19,代码来源:Transfer.php

示例10: __get

 /**
  *
  * @see \yii\base\Object::__get()
  * @param string $name
  * @return mixed
  * @throws WorkflowException
  */
 public function __get($name)
 {
     if ($this->canGetProperty($name)) {
         return parent::__get($name);
     } elseif ($this->hasMetadata($name)) {
         return $this->_metadata[$name];
     } else {
         throw new WorkflowException("No metadata found is the name '{$name}'");
     }
 }
开发者ID:fproject,项目名称:workflowii,代码行数:17,代码来源:AbstractWorkflowItem.php

示例11: __get

 public function __get($name)
 {
     if ($this->_payload && isset($this->_payload[$name])) {
         return $this->_payload[$name];
     } else {
         if (isset($this->{$name})) {
             return parent::__get($name);
         } else {
             throw new \yii\base\Exception("The '" . $name . "' attribute " . "was not found in CrugeIdentity or in its Payload.");
         }
     }
 }
开发者ID:freesoftwarefactory,项目名称:cruge,代码行数:12,代码来源:CrugeIdentity.php

示例12: __call

 /**
  * @param string $name
  * @param array $params
  * @return mixed
  * @throws \yii\base\UnknownPropertyException
  */
 public function __call($name, $params)
 {
     if (method_exists($this->model, $name)) {
         return call_user_func_array([$this->model, $name], $params);
     }
     foreach ($this->model->behaviors as $behavior) {
         if (method_exists($behavior, $name)) {
             return call_user_func_array([$this->model, $name], $params);
         }
     }
     return parent::__get($name);
 }
开发者ID:vetoni,项目名称:toko,代码行数:18,代码来源:ApiObject.php

示例13: __get

 /**
  * @inheritdoc
  */
 public function __get($name)
 {
     // getters go first
     $getter = 'get' . $name;
     if (method_exists($this, $getter)) {
         return $this->{$getter}();
     }
     return ArrayHelper::keyExists($name, $this->options) ? $this->options[$name] : parent::__get($name);
 }
开发者ID:denisiodb,项目名称:yii2-google-maps-library,代码行数:12,代码来源:ObjectAbstract.php

示例14: __get

 /**
  * @param string $name
  * @return ParamsObject|mixed|null
  * @throws UnknownPropertyException
  */
 public function __get($name)
 {
     try {
         return parent::__get($name);
     } catch (UnknownPropertyException $e) {
         return $this->params($name);
     }
 }
开发者ID:ezsky,项目名称:yii2-platform-core,代码行数:13,代码来源:ParamsManager.php

示例15: __get

 /**
  * @inheritdoc
  */
 public function __get($name)
 {
     return parent::__get(Inflector::camelize($name));
 }
开发者ID:cookyii,项目名称:base,代码行数:7,代码来源:AbstractHelper.php


注:本文中的yii\base\Object::__get方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。