Пример #1
0
 /**
  * @param int $id
  * @param string $cols
  * @return Ambigous <boolean, unknown>
  */
 function getRegistryEntry($id, $cols = "")
 {
     $adapter = $this->adapter;
     $sql = new Sql($adapter);
     if ($cols != "") {
         $colsArr = explode(",", $cols);
     }
     $select = $sql->select();
     $where = array('mod_id' => $id);
     $select->from("modules")->columns($colsArr)->where($where);
     $selectString = $sql->getSqlStringForSqlObject($select);
     //LOGGING QUERIES
     $parameter = array('query' => $selectString, 'type' => 1);
     $obj = new ApplicationTable();
     $obj->log($parameter);
     $results = $adapter->query($selectString, $adapter::QUERY_MODE_EXECUTE);
     $resultSet = new ResultSet();
     $resultSet->initialize($results);
     $resArr = $resultSet->toArray();
     $rslt = $resArr[0];
     $mod = new InstModule();
     $mod->exchangeArray($rslt);
     return $mod;
 }