/** * @param int $type * @return string */ protected function _getCollectionName($type) { $className = CM_Model_Abstract::getClassName($type); /** @var CM_Model_Abstract $className */ return $className::getTableName(); }
/** * @param int|null $type * @param int|null $adapterType * @param string|null $mediaId * @return CM_Model_StreamChannel_Abstract */ public static function createStreamChannel($type = null, $adapterType = null, $mediaId = null) { if (null === $type) { $type = CM_Model_StreamChannel_Media::getTypeStatic(); } if (null === $adapterType) { $adapterType = CM_Janus_Service::getTypeStatic(); } $data = array('key' => rand(1, 10000) . '_' . rand(1, 100)); $className = CM_Model_Abstract::getClassName($type); if ('CM_Model_StreamChannel_Media' === $className || is_subclass_of($className, 'CM_Model_StreamChannel_Media')) { $mediaId = null !== $mediaId ? (string) $mediaId : null; $data['width'] = 480; $data['height'] = 720; $data['serverId'] = 1; $data['adapterType'] = $adapterType; $data['mediaId'] = $mediaId; } return CM_Model_StreamChannel_Abstract::createType($type, $data); }