/** * @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); }
/** * @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); }
/** * @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); }