Exemple #1
0
 /**
  * Set $instance as the proxy instance of the current row.
  *
  * @param Centurion_Db_Table_Row_Abstract $instance
  * @return Centurion_Db_Table_Row_Abstract
  */
 public function _setProxy(Centurion_Db_Table_Row_Abstract $instance)
 {
     list($contentTypeRow, ) = Centurion_Db::getSingleton('core/contentType')->getOrCreate(array('name' => get_class($instance->getTable())));
     $this->proxy_content_type_id = $contentTypeRow->id;
     $this->proxy_pk = $instance->id;
 }
Exemple #2
0
 public function signalRow($signal, Centurion_Db_Table_Row_Abstract $row)
 {
     $pk = is_string($row->pk) || is_int($row->pk) ? $row->pk : md5(serialize($row->pk));
     $tag = sprintf('__%s__%s', $row->getTable()->info(Centurion_Db_Table_Abstract::NAME), $pk);
     $this->cleanCacheAsynchronous(Zend_Cache::CLEANING_MODE_MATCHING_ANY_TAG, array($tag));
     $tag = sprintf('__%s', $row->getTable()->info(Centurion_Db_Table_Abstract::NAME));
     $this->cleanCacheAsynchronous(Zend_Cache::CLEANING_MODE_MATCHING_ANY_TAG, array($tag));
     return $this;
 }
Exemple #3
0
 /**
  * Set belong for the query.
  * @param Centurion_Db_Table_Row_Abstract $object
  * @return Media_Model_DbTable_Select_File
  */
 public function belong($object)
 {
     $contentType = get_class($object->getTable());
     $this->where('belong_model = ?', $contentType)->where('belong_pk = ?', $object->pk);
     return $this;
 }