本文整理匯總了PHP中Nette\Utils\ObjectMixin::get方法的典型用法代碼示例。如果您正苦於以下問題:PHP ObjectMixin::get方法的具體用法?PHP ObjectMixin::get怎麽用?PHP ObjectMixin::get使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Nette\Utils\ObjectMixin
的用法示例。
在下文中一共展示了ObjectMixin::get方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1:
/**
* Returns value of column / referenced row
*
* @param $key
* @return mixed|HyperRow|HyperSelection
*/
public function &__get($key)
{
// Try to get method - getter
if (ObjectMixin::has($this, $key)) {
return ObjectMixin::get($this, $key);
}
// Otherwise get ActiveRow property
$result = $this->activeRow->__get($key);
if ($result instanceof ActiveRow) {
$hyperrow = $this->factory->createRow($result, $result->getTable()->getName());
return $hyperrow;
}
return $result;
}
示例2:
/**
* Returns property value. Do not call directly.
*
* @param string $name
*
* @throws \Nette\MemberAccessException
* @return mixed
*/
public function &__get($name)
{
return ObjectMixin::get($this, $name);
}
示例3:
/**
* Returns property value. Do not call directly.
* @param string property name
* @return mixed property value
* @throws MemberAccessException if the property is not defined.
*/
public function &__get($name)
{
return Nette\Utils\ObjectMixin::get($this, $name);
}