Example #1
0
 private function getProperty($name)
 {
     if (!isset($this->properties)) {
         $q = $this->inner->getBaseResourceQuery();
         $q = $q->amend(['where' => ['r.resource_id', '=', $this->resourceId, \PDO::PARAM_INT]]);
         $this->properties = $q->queryFetchSingleRow();
     }
     if (!isset($this->properties[$name])) {
         throw new Error("Invalid property: {$name}");
     }
     return $this->properties[$name];
 }