示例#1
0
 /**
  * @param string $key
  * @return mixed
  */
 public function get($key)
 {
     if (!property_exists($this->items, $key) && array_key_exists($key, (array) $this->items)) {
         $items = (array) $this->items;
         return $items[$key];
     }
     $value = $this->items->{$key};
     if (is_object($value)) {
         return $this->make($value);
     } else {
         if (is_array($value)) {
             return ArrayContainer::reference($this->items->{(string) $key});
         }
     }
     return $value;
 }