コード例 #1
0
 public function offsetExists($offset)
 {
     if ($this->missing) {
         return TRUE;
     }
     if (!array_key_exists($offset, $this->elements)) {
         $parameter = array_merge($this->parameter, [$offset]);
         if ($entity = $this->context->offsetGet("list")->queryEntity($parameter, $unused, FALSE)) {
             $this->elements[$offset] = new UpdateEntityForm($entity, ["", "update_entity"], [], $this, $this->getLoops());
         } else {
             $this->elements[$offset] = NULL;
         }
     }
     if ($this->elements[$offset]) {
         return TRUE;
     }
     return parent::offsetExists($offset);
 }
コード例 #2
0
ファイル: WrappedObject.php プロジェクト: loopsframework/base
 public function offsetGet($offset)
 {
     if (parent::offsetExists($offset)) {
         return parent::offsetGet($offset);
     }
     if ($this->wrapped_object instanceof ArrayAccess) {
         return $this->wrapped_object->offsetGet($offset);
     }
 }