public function add(CM_Action_Abstract $action) { CM_Db_Db::insertDelayed('cm_action', array('actorId' => $this->_user->getId(), 'verb' => $action->getVerb(), 'type' => $action->getType(), 'createStamp' => time())); }
/** * @param CM_Action_Abstract $action */ public function __construct(CM_Action_Abstract $action) { $source = new CM_PagingSource_Sql('DISTINCT `actionType`, `actionVerb`, `type`', 'cm_actionLimit', '`actionType` = ' . $action->getType() . ' AND `actionVerb` = ' . $action->getVerb(), '`type`'); $source->enableCacheLocal(); parent::__construct($source); }
public function add(CM_Action_Abstract $action, $limitType) { $limitType = (int) $limitType; CM_Db_Db::insertDelayed('cm_action', array('ip' => $this->_ip, 'verb' => $action->getVerb(), 'type' => $action->getType(), 'actionLimitType' => $limitType, 'createStamp' => time())); }
/** * @param string $streamChannel * @param CM_Action_Abstract $action * @param CM_Model_Abstract $model * @param mixed|null $data */ public static function publishAction($streamChannel, CM_Action_Abstract $action, CM_Model_Abstract $model, $data = null) { $namespace = 'CM_Action_Abstract' . ':' . $action->getVerbName() . ':' . $action->getType(); self::publish($streamChannel, $namespace, array('action' => $action, 'model' => $model, 'data' => $data)); }