当前位置: 首页>>代码示例>>PHP>>正文


PHP Gpf_Data_RecordSet::toObject方法代码示例

本文整理汇总了PHP中Gpf_Data_RecordSet::toObject方法的典型用法代码示例。如果您正苦于以下问题:PHP Gpf_Data_RecordSet::toObject方法的具体用法?PHP Gpf_Data_RecordSet::toObject怎么用?PHP Gpf_Data_RecordSet::toObject使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Gpf_Data_RecordSet的用法示例。


在下文中一共展示了Gpf_Data_RecordSet::toObject方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: toObject

 public function toObject()
 {
     $this->localizeRecordSet($this->cachedData);
     $response = new Gpf_Rpc_Object();
     $response->rows = $this->cachedData->toObject();
     $response->count = (int) $this->size;
     return $response;
 }
开发者ID:AmineCherrai,项目名称:rostanvo,代码行数:8,代码来源:RichListBox.class.php

示例2: toObject

 public function toObject()
 {
     $object = new stdClass();
     $object->rows = $this->rows->toObject();
     $object->from = $this->from;
     $object->to = $this->to;
     $object->count = $this->count;
     return $object;
 }
开发者ID:AmineCherrai,项目名称:rostanvo,代码行数:9,代码来源:Table.class.php

示例3: decode

 /**
  * @param array $requestArray
  * @return StdClass
  */
 function decode($requestArray)
 {
     $param = new stdClass();
     $reservedParams = array(Gpf_Rpc_Params::CLASS_NAME, Gpf_Rpc_Params::METHOD_NAME, Gpf_Rpc_Params::SESSION_ID, Gpf_Rpc_Server::FORM_REQUEST, Gpf_Rpc_Server::FORM_RESPONSE);
     $recordset = new Gpf_Data_RecordSet();
     $recordset->setHeader(array("name", "value"));
     foreach ($requestArray as $name => $value) {
         if (in_array($name, $reservedParams)) {
             continue;
         }
         if (get_magic_quotes_gpc()) {
             $value = stripslashes($value);
         }
         $record = $recordset->createRecord();
         $record->set("name", $name);
         $record->set("value", $value);
         $recordset->add($record);
     }
     $param->fields = $recordset->toObject();
     foreach ($reservedParams as $paramName) {
         if (array_key_exists($paramName, $requestArray)) {
             $param->{$paramName} = $requestArray[$paramName];
         }
     }
     return $param;
 }
开发者ID:AmineCherrai,项目名称:rostanvo,代码行数:30,代码来源:FormHandler.class.php

示例4: fillFromUser

 private function fillFromUser(Gpf_Rpc_Form $form, Pap_Affiliates_User $user) {
     $userData = new Gpf_Data_RecordSet();
     $userData->setHeader(array('userid', 'username','firstname', 'lastname'));
     $data = $userData->createRecord();
     $data->add('userid', $user->getId());
     $data->add('username', $user->getUserName());
     $data->add('firstname', $user->getFirstName());
     $data->add('lastname', $user->getLastName());
     $userData->add($data);
     $form->setField('userid', null, $userData->toObject());
 }
开发者ID:AmineCherrai,项目名称:rostanvo,代码行数:11,代码来源:OfflineSaleForm.class.php

示例5: addField

 private function addField($caption, $code, $type, $status, $help = '', $values = array())
 {
     $record = $this->fieldsRecordset->createRecord();
     $record->set('id', '0');
     $record->set('code', $code);
     $record->set('name', $caption);
     $record->set('help', $help);
     $record->set('type', $type);
     $record->set('status', $status);
     if (count($values) > 0) {
         $valuesRecordSet = new Gpf_Data_RecordSet();
         $valuesRecordSet->setHeader(array("id", "value"));
         foreach ($values as $id => $value) {
             if ($id != '') {
                 $valuesRecordSet->add(array($id, $value));
             }
         }
         $json = new Gpf_Rpc_Json();
         $record->set('availablevalues', $json->encode($valuesRecordSet->toObject()));
     }
     $this->fieldsRecordset->addRecord($record);
 }
开发者ID:AmineCherrai,项目名称:rostanvo,代码行数:22,代码来源:Config.class.php

示例6: getRows

 /**
  * Returns row data for grid
  *
  * @service language read
  *
  * @param $filters
  * @param $limit
  * @param $offset
  * @param $sort_col
  * @param $sort_asc
  * @param Gpf_Data_RecordSet $columns
  * @return Gpf_Rpc_Serializable
  */
 public function getRows(Gpf_Rpc_Params $params)
 {
     $this->_params = $params;
     $this->_sortColumn = $params->get('sort_col');
     $this->_sortAsc = $params->get('sort_asc');
     $this->_requiredColumns = new Gpf_Data_IndexedRecordSet('id');
     $this->_requiredColumns->loadFromArray($params->get('columns'));
     $response = new Gpf_Rpc_Object();
     $recordHeader = new Gpf_Data_RecordHeader();
     $result = new Gpf_Data_RecordSet();
     foreach ($this->getAllViewColumns() as $column) {
         $result->addColumn($column->get('id'));
         $recordHeader->add($column->get('id'));
     }
     $result->addColumn('id');
     $recordHeader->add('id');
     $languagesIterator = new Gpf_Io_DirectoryIterator(Gpf_Paths::getInstance()->getLanguageInstallDirectory(), 'csv', false);
     $languagesCount = 0;
     foreach ($languagesIterator as $fullName => $file) {
         if (preg_match('/^' . Gpf_Application::getInstance()->getCode() . '_(.+)\\.csv$/', $file, $matches)) {
             $file = new Gpf_Io_Csv_Reader($fullName, ';', '"', array('source', 'translation', 'type', 'module', 'status', 'customer'));
             $language = new Gpf_Lang_CsvLanguage();
             $language->loadFromCsvFile($file, true);
             $languagesCount++;
             $record = new Gpf_Data_Record($recordHeader);
             $record->set('id', $fullName);
             $record->set(Gpf_Db_Table_Languages::CODE, $language->getMetaValue(Gpf_Lang_CsvLanguage::LANG_CODE));
             $record->set(Gpf_Db_Table_Languages::NAME, $language->getMetaValue(Gpf_Lang_CsvLanguage::LANG_NAME));
             $record->set(Gpf_Db_Table_Languages::ENGLISH_NAME, $language->getMetaValue(Gpf_Lang_CsvLanguage::LANG_ENG_NAME));
             $record->set(Gpf_Db_Table_Languages::TRANSLATED_PERCENTAGE, $language->getMetaValue(Gpf_Lang_CsvLanguage::LANG_TRANSLATION_PERCENTAGE));
             $record->set(Gpf_Db_Table_Languages::AUTHOR, $language->getMetaValue(Gpf_Lang_CsvLanguage::LANG_AUTHOR));
             $record->set(Gpf_Db_Table_Languages::VERSION, $language->getMetaValue(Gpf_Lang_CsvLanguage::LANG_VERSION));
             $result->addRecord($record);
         }
     }
     $response->rows = $result->toObject();
     $response->count = $languagesCount;
     return $response;
 }
开发者ID:AmineCherrai,项目名称:rostanvo,代码行数:52,代码来源:AddLanguageGrid.class.php

示例7: toObject

 public function toObject()
 {
     return $this->data->toObject();
 }
开发者ID:AmineCherrai,项目名称:rostanvo,代码行数:4,代码来源:ClientWidget.class.php

示例8: createGridResponse

 /**
  * @param $result
  * @return Gpf_Rpc_Object
  */
 protected function createGridResponse(Gpf_Data_RecordSet $result) {
     //TODO: use Gpf_Data_Grid
     $response = new Gpf_Rpc_Object();
     $response->rows = $result->toObject();
     $response->count = $this->getCount();
     return $response;
 }
开发者ID:AmineCherrai,项目名称:rostanvo,代码行数:11,代码来源:GridService.class.php


注:本文中的Gpf_Data_RecordSet::toObject方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。