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


PHP app::getModel方法代码示例

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


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

示例1: gridAction

 public function gridAction()
 {
     $block = new manage_block_city_grid();
     $collection = app::getModel('manage_model_city')->getCollection();
     $block->setVar('collection', $collection);
     $block->renderHtml();
 }
开发者ID:vgalitsky,项目名称:git_trade,代码行数:7,代码来源:city.php

示例2: gridAction

 public function gridAction()
 {
     $block = new manage_block_user_grid();
     /** @var manage_model_user_collection $collection */
     $collection = app::getModel('manage_model_user')->getCollection();
     $block->setVar('collection', $collection);
     $block->renderHtml();
 }
开发者ID:vgalitsky,项目名称:git_trade,代码行数:8,代码来源:user.php

示例3: getAllTradePointsJsonAction

 public function getAllTradePointsJsonAction()
 {
     try {
         $filter = $this->getRequest()->getParam('filter');
         /** @var manage_model_event_collection $events */
         $tradepoints = app::getModel('manage_model_tradepoint')->getCollection();
         $tradepoints->load();
         $tradepoints_array = $tradepoints->toArray();
         $json = self::okJson($tradepoints_array);
     } catch (Exception $e) {
         $json = self::errJson($e->getMessage());
     }
     echo $json;
 }
开发者ID:vgalitsky,项目名称:git_trade,代码行数:14,代码来源:tradepoint.php

示例4: some_actionAction

 public function some_actionAction()
 {
     $testModel = app::getModel('manage_model_test');
     $col = $testModel->getCollection();
     foreach ($col as $m) {
         var_dump($m);
     }
     //var_dump($col);
     //$testModel->load(1);
     //$testModel->setData('field1',777);
     //$testModel->setData('field2',555);
     // $testModel->save();
     //var_dump($testModel);
     die('bla');
     $this->initLayout();
     $page = $this->getLayout()->getPageBlock();
     $page->addChild('content', new manage_block_test());
     $this->renderLayout();
 }
开发者ID:vgalitsky,项目名称:git_trade,代码行数:19,代码来源:test.php

示例5: load

 public function load()
 {
     $this->_beforeLoad();
     /** @var PDOStatement $stmt */
     $this->setStatement($this->getConnection()->prepare($this->getSql()));
     $this->getStatement()->execute($this->getSqlValues());
     while ($row = $this->getStatement()->fetch(PDO::FETCH_ASSOC)) {
         $model = app::getModel($this->getModelClass());
         $row = $this->_beforeLoadItemData($row, $model);
         $model->_beforeLoad();
         $model->setData($row)->setOrigData($row);
         $model->_afterLoad();
         $this->_afterLoadItemData($model);
         $this->_items[] = $model;
     }
     $this->isLoaded(true);
     $this->_afterLoad();
     return $this;
 }
开发者ID:vgalitsky,项目名称:moze,代码行数:19,代码来源:collection.php


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