Beispiel #1
0
 /**
  * @param CM_Model_StreamChannel_Abstract $streamChannel
  */
 public function __construct(CM_Model_StreamChannel_Abstract $streamChannel)
 {
     $source = new CM_PagingSource_Sql('`id`', 'cm_stream_subscribe', '`channelId` = ' . $streamChannel->getId());
     $source->enableCache();
     return parent::__construct($source);
 }
Beispiel #2
0
 /**
  * @param CM_Model_User $user
  */
 public function __construct(CM_Model_User $user)
 {
     $source = new CM_PagingSource_Sql('`id`', 'cm_stream_subscribe', '`userId` = ' . $user->getId());
     parent::__construct($source);
 }
Beispiel #3
0
 /**
  * @param int $adapterType
  */
 public function __construct($adapterType)
 {
     $adapterType = (int) $adapterType;
     $source = new CM_PagingSource_Sql('`cm_stream_subscribe`.`id`', 'cm_stream_subscribe', '`adapterType` = ' . $adapterType, null, 'JOIN `cm_streamChannel` ON `cm_stream_subscribe`.`channelId` = `cm_streamChannel`.`id`');
     return parent::__construct($source);
 }