Пример #1
0
 public function getCollectionsItems(Zend_Controller_Action $controller)
 {
     X_Debug::i("Using cached content");
     if ($this->inCache !== false) {
         return unserialize($this->inCache->getContent());
     }
 }
 /**
  * Store model in the db
  * if $model->id is null, add a new row
  * @param Application_Model_Cache $model
  */
 public function save(Application_Model_Cache $model)
 {
     $data = array('uri' => $model->getUri(), 'content' => $model->getContent(), 'cType' => $model->getCType(), 'validity' => $model->getValidity(), 'created' => $model->getCreated());
     if ($model->isNew()) {
         //unset ( $data ['id'] );
         $this->getDbTable()->insert($data);
         //$model->setId($id);
     } else {
         $this->getDbTable()->update($data, array('uri = ?' => $model->getUri()));
     }
 }