Example #1
0
 /**
  * @return Model
  **/
 public function merge(Model $model, $overwrite = false)
 {
     if (!$model->isEmpty()) {
         $vars = $model->getList();
         foreach ($vars as $name => $value) {
             if (!$overwrite && $this->has($name)) {
                 continue;
             }
             $this->set($name, $value);
         }
     }
     return $this;
 }
Example #2
0
 /**
  * Returns list of key=>value options
  * @return array
  */
 public function getList($key = 'stocks_id', $value = 'stocks_symbol', $where = null)
 {
     return parent::getList($key, $value, $where);
 }
Example #3
0
 /**
  * Returns list of key=>value options
  * @return array
  */
 public function getList($key = 'trades_id', $value = 'trade_details', $where = null)
 {
     return parent::getList($key, $value, $where);
 }
Example #4
0
 /**
  * (non-PHPdoc)
  * @see Bgtask_Storage::getList()
  */
 public function getList()
 {
     return $this->_objectModel->getList(false, false);
 }
Example #5
0
 /**
  * Returns list of key=>value options
  * @return array
  */
 public function getList($key = 'id', $value = 'stock_name', $where = null)
 {
     return parent::getList($key, $value, $where);
 }
Example #6
0
<?php

require_once __DIR__ . '/mrpropper/db/sqlite.php';
$db = new Model();
$lrec = $db->getLastDateRec();
$listdate = $lrec['file_date'];
$res = $db->getList($lrec['try_date']);
/*
*    profession
     organisation
     additions
     salary
     address
     contacts
     search
*/
?>
<html>
<head>
    <meta name="description" content="Вакансии в Нягани, работа в Нягани, центр занятости, биржа труда" />
    <meta name="viewport" content="width=device-width">
    <title>Работа в Нягани - ny86.ru</title>
    <meta charset="UTF-8" />
    <link rel="shortcut icon" href="/favicon.ico"/>
    <link rel="stylesheet" type="text/css" href="/css/common.css">
    <script src="/js/common.js"></script>
    <script>
        var vaclist = {
            <?php 
foreach ($res as $vac) {
    ?>
 /**
  * Return a list of records. If a certain method exists, use it.
  *
  * @param Model $model
  * @return array
  */
 public function getRecordList(Model $model)
 {
     if ($model->hasMethod('generateTreeList')) {
         return $model->generateTreeList(null, null, null, ' -- ');
     } else {
         if ($model->hasMethod('getList')) {
             return $model->getList();
         }
     }
     return $model->find('list', array('order' => array($model->alias . '.' . $model->displayField => 'ASC')));
 }
 /**
  * @param Model $model
  * @return string
  */
 public function toString($model = null)
 {
     Assert::isTrue($model === null || $model instanceof Model);
     if ($this->options) {
         return json_encode($model ? $model->getList() : array(), $this->options);
     } else {
         return json_encode($model ? $model->getList() : array());
     }
 }