获取关联属性值
@access protected
@param  string   $name  属性名
@param  array    $item  数据
@return mixed
508116
protected function getRelationAttribute($name, &$item)
    {
        $relation = $this->isRelationAttr($name);

        if ($relation) {
            $modelRelation = $this->$relation();
            if ($modelRelation instanceof Relation) {
                $value = $this->getRelationData($modelRelation);

                if ($item && method_exists($modelRelation, 'getBindAttr') && $bindAttr = $modelRelation->getBindAttr()) {

                    foreach ($bindAttr as $key => $attr) {
                        $key = is_numeric($key) ? $attr : $key;

                        if (isset($item[$key])) {
                            throw new Exception('bind attr has exists:' . $key);
                        } else {
                            $item[$key] = $value ? $value->getAttr($attr) : null;
                        }
                    }

                    return false;
                }

                // 保存关联对象值
                $this->relation[$name] = $value;

                return $value;
            }
        }

        throw new InvalidArgumentException('property not exists:' . static::class . '->' . $name);
    }
1302729
protected function extractValue($item, $key)
    {
        if (is_object($item)) {
            if (method_exists($item, 'hasMethod') && $item->hasMethod($key)) {
                return $item->{$key}();
            }
            return $item->{$key};
        } else {
            if (array_key_exists($key, $item)) {
                return $item[$key];
            }
        }
    }
957921
public function getValue(ArrayAccess $item): string
    {
        $value = $item->offsetExists($this->name)
            ? $item->offsetGet($this->name)
            : '';

        if (is_callable($this->filter)) {
            if ($this->filter instanceof ContextAwareFilterInterface) {
                $this->filter->setContext(clone $item);
            }

            $value = call_user_func($this->filter, $value);
        }

        return $value;
    }
18116
public function get( $name )
	{
		if ($this->offsetExists($name))
		{
			return $this->items[$name];
		}
		return $this->itemsGetUndefined;
	}
794223
public function getItemUrl($item)
    {
        $item = $this->getItem($item);
        return $item ? $item->normalizedUrl : null;
    }
1012532
public function get($name)
    {
        return isset($this->items[$name]) ? $this->items[$name] : null;
    }
951039
protected function recursiveToArray($item)
    {
        if (is_array($item)) {

            foreach ($item as &$subitem) {
                $subitem = $this->recursiveToArray($subitem);
            }

            unset($subitem);

            return $item;
        }

        if ($item instanceof Arrayable) {
            return $item->toArray();
        }

        return $item;
    }
697523
public function getUrlManagerConfig($item)
    {
        $urlManager = $this->getConfigByName('urlManager');
        if (isset($urlManager[$item])) {
            return $urlManager[$item];
        }
        return false;
    }
143842
public function getItem($item, &$parents = [])
    {
        if (is_array($item) && !$this->isRoute($item)) {
            $item = $item['url'];
        }
        if (is_string($item) && strpos($item, '/') === false) {
            $item = implode('.items.', explode('.', $item));
            return ArrayHelper::getValue($this->getItems(), $item);
        }
        return $this->findItemRecursive($item, $this->getItems(), $parents);
    }
80800
function get ($name)
  {
    if (isset($this->items[$name]))
      return $this->items[$name];
    throw new \OutOfBoundsException (sprintf ("%s is not registered on %s.%sCurrently registered: %s", $name,
      static::class, PHP_EOL, $this->items ? implode (', ', array_keys ($this->items)) : '(empty)'));
  }
121764
public function getUser($item = null)
    {
        if (isset($item)) {
            return gplcart_array_get($this->current_user, $item);
        }

        return $this->current_user;
    }
1355347
public function getItem($name)
    {
        if (func_num_args() > 1)
            $name = func_get_args();

        $info  = $this->getItemData($name);
        $class = $info['class'];

        return new $class();
    }
1069932
public function actionGet ($name)
		{
			$class = $this->_modelClass;
			$object = $class::find()->select('name,value,description')->where([ 'name' => $name ])->asArray()->one();
			if ($object == null)
			{
				Console::printColor('Setting not found.', 'red');
				Yii::$app->end();
			}
			Console::printTable([ $object ], [ 'Name', 'Value', 'Description' ]);
		}
476837
public function __item($item = null)
    {
        $result = parent::__item($item);
        $result['content'] = true;
        return $result;
    }
1285936
public function createFromArray(array $data, $name = null)
    {
        $preloadOids = $itemList = array();
        $menu        = $this->_createFromArray($data, $name, $itemList, $preloadOids);

        if ($preloadOids && $this->aclProvider) {
            //preload all acls for menu items
            try {
                $this->aclProvider->findAcls($preloadOids);
            } catch(AclNotFoundException $e) {
            }
        }

        foreach ($itemList as $item) {
            $this->setContext($item[0], $item[1], $item[2]);
        }

        return $menu;
    }
181554
protected function findOrCreateItem(array $item)
    {
        $object = null;
        // If the table was not truncated to begin with, find current object
        // first
        if (!$this->truncate) {
            if (!empty($this->lookupFields)) {
                $lookupConditions = array();
                foreach ($this->lookupFields as $fieldName) {
                    $lookupConditions[$fieldName] = $item[$fieldName];
                }

                $object = call_user_func($this->lookupMethod, $lookupConditions);
            } else {
                $object = $this->objectRepository->find(current($item));
            }
        }

        if (!$object) {
            return $this->getNewInstance();
        }

        return $object;
    }
1368882
public function getItemData($name): array
    {
        if (func_num_args() > 1)
            $name = func_get_args();

        if (!$this->hasItemData($name))
            return $this->getItemDataNotFound($name);

        return $this->getData()[$this->getItemKey($name)];
    }