本文整理汇总了PHP中uiConfPeer::doSelect方法的典型用法代码示例。如果您正苦于以下问题:PHP uiConfPeer::doSelect方法的具体用法?PHP uiConfPeer::doSelect怎么用?PHP uiConfPeer::doSelect使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类uiConfPeer
的用法示例。
在下文中一共展示了uiConfPeer::doSelect方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: execute
public function execute()
{
$this->forceSystemAuthentication();
myDbHelper::$use_alternative_con = null;
$partnerId = $this->getRequestParameter("partnerId", null);
if ($partnerId !== null) {
$partnerId = (int) $partnerId;
}
$c = new Criteria();
$c->add(uiConfPeer::PARTNER_ID, $partnerId);
$c->addDescendingOrderByColumn(uiConfPeer::CREATED_AT);
$this->uiconfs = uiConfPeer::doSelect($c);
$partner = PartnerPeer::retrieveByPK($partnerId);
$this->partner = $partner;
$this->partnerId = $partnerId;
}
示例2: executeImpl
public function executeImpl($partner_id, $subp_id, $puser_id, $partner_prefix, $puser_kuser)
{
$this->applyPartnerFilterForClass('uiConf', $partner_id);
$detailed = $this->getP("detailed", false);
$detailed_fields = $this->getP("detailed_fields");
$limit = $this->getP("page_size", 10);
$limit = $this->maxPageSize($limit);
$page = $this->getP("page", 1);
$offset = ($page - 1) * $limit;
$c = new Criteria();
// filter
$filter = new uiConfFilter();
$fields_set = $filter->fillObjectFromRequest($this->getInputParams(), "filter_", null);
$this->setExtraFilters($filter);
$filter->attachToCriteria($c);
$count = uiConfPeer::doCount($c);
if ($count > 0) {
$offset = ($page - 1) * $limit;
$c->setLimit($limit);
if ($offset > 0) {
$c->setOffset($offset);
}
$list = uiConfPeer::doSelect($c);
$level = $detailed ? objectWrapperBase::DETAIL_LEVEL_DETAILED : objectWrapperBase::DETAIL_LEVEL_REGULAR;
} else {
// no need to query the data - there is none !
$list = array();
$level = objectWrapperBase::DETAIL_LEVEL_REGULAR;
}
$this->addMsg("count", $count);
$this->addMsg("page_size", $limit);
$this->addMsg("page", $page);
foreach ($list as $listed_uiConf) {
if (!$listed_uiConf->isValid()) {
$this->addError(APIErrors::INTERNAL_SERVERL_ERROR, "uiConf object [{$listed_uiConf->getId()}] is not valid");
return;
}
}
if ($detailed_fields) {
$extra_fields = explode(",", $detailed_fields);
$wrapper = objectWrapperBase::getWrapperClass($list, $level, objectWrapperBase::DETAIL_VELOCITY_DEFAULT, 0, $extra_fields);
} else {
$wrapper = objectWrapperBase::getWrapperClass($list, $level);
}
$this->addMsg($this->getObjectPrefix(), $wrapper);
}
示例3: listAction
/**
* Retrieve a list of available UIConfs with no partner limitation
*
* @action list
* @param KalturaUiConfFilter $filter
* @param KalturaFilterPager $pager
* @return KalturaUiConfAdminListResponse
*/
function listAction(KalturaUiConfFilter $filter = null, KalturaFilterPager $pager = null)
{
myDbHelper::$use_alternative_con = myDbHelper::DB_HELPER_CONN_PROPEL2;
if (!$filter) {
$filter = new KalturaUiConfFilter();
}
$uiConfFilter = new uiConfFilter();
$filter->toObject($uiConfFilter);
$c = new Criteria();
$uiConfFilter->attachToCriteria($c);
$count = uiConfPeer::doCount($c);
if ($pager) {
$pager->attachToCriteria($c);
}
$list = uiConfPeer::doSelect($c);
$newList = KalturaUiConfAdminArray::fromUiConfAdminArray($list);
$response = new KalturaUiConfAdminListResponse();
$response->objects = $newList;
$response->totalCount = $count;
return $response;
}
示例4: ini_set
<?php
ini_set("memory_limit", "256M");
require_once __DIR__ . '/bootstrap.php';
if (!$argc) {
die('pleas provide partner id as input' . PHP_EOL . 'to run script: ' . basename(__FILE__) . ' X' . PHP_EOL . 'whereas X is partner id' . PHP_EOL);
}
$partnerId = $argv[0];
$dbConf = kConf::getDB();
DbManager::setConfig($dbConf);
DbManager::initialize();
$c = new Criteria();
$c->add(uiConfPeer::SWF_URL, "%kcw%", Criteria::LIKE);
$c->add(uiConfPeer::OBJ_TYPE, uiConf::UI_CONF_TYPE_CW, Criteria::EQUAL);
$c->add(uiConfPeer::PARTNER_ID, $partnerId, Criteria::EQUAL);
$kcwUiconfs = uiConfPeer::doSelect($c);
if (!count($kcwUiconfs)) {
exit;
}
$fileName = "/manual_uiconfs_paths.log";
$flog = fopen($fileName, 'a+');
//Run a loop for each uiConf to get its filesync key, thus acquiring its confile
foreach ($kcwUiconfs as $kcwUiconf) {
/* @var $kcwUiconf uiConf */
$kcwUiconfFilesyncKey = $kcwUiconf->getSyncKey(uiConf::FILE_SYNC_UICONF_SUB_TYPE_DATA);
$kcwConfile = kFileSyncUtils::file_get_contents($kcwUiconfFilesyncKey, false, false);
if (!$kcwConfile) {
continue;
}
$kcwConfileXML = new SimpleXMLElement($kcwConfile);
$path = '//provider[@id="kaltura" or @name="kaltura"]';
$nodesToRemove = $kcwConfileXML->xpath($path);
示例5: retrieveByPKs
/**
* Retrieve multiple objects by pkey.
*
* @param array $pks List of primary keys
* @param PropelPDO $con the connection to use
* @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException.
*/
public static function retrieveByPKs($pks, PropelPDO $con = null)
{
$objs = null;
if (empty($pks)) {
$objs = array();
} else {
$criteria = new Criteria(uiConfPeer::DATABASE_NAME);
$criteria->add(uiConfPeer::ID, $pks, Criteria::IN);
$objs = uiConfPeer::doSelect($criteria, $con);
}
return $objs;
}
示例6: copyUiConfsByType
public static function copyUiConfsByType(Partner $fromPartner, Partner $toPartner, $uiConfType)
{
KalturaLog::log("Copying uiconfs from partner [" . $fromPartner->getId() . "] to partner [" . $toPartner->getId() . "] with type [" . $uiConfType . "]");
uiConfPeer::setUseCriteriaFilter(false);
$c = new Criteria();
$c->addAnd(uiConfPeer::PARTNER_ID, $fromPartner->getId());
$c->addAnd(uiConfPeer::OBJ_TYPE, $uiConfType);
$c->addAnd(uiConfPeer::STATUS, uiConf::UI_CONF_STATUS_READY);
$uiConfs = uiConfPeer::doSelect($c);
uiConfPeer::setUseCriteriaFilter(true);
foreach ($uiConfs as $uiConf) {
// create a new uiConf, set its partner Id (so that upcoming file_sync will have the new partner's id)
// and clone fileds from current uiConf
$newUiConf = new uiConf();
$newUiConf->setPartnerId($toPartner->getId());
$newUiConf = $uiConf->cloneToNew($newUiConf);
$newUiConf->save();
KalturaLog::log("UIConf [" . $newUiConf->getId() . "] was created");
}
}
示例7: getUiconfList
private function getUiconfList($tag = 'player')
{
$template_partner_id = isset($this->templatePartnerId) ? $this->templatePartnerId : 0;
$c = new Criteria();
$crit_partner = $c->getNewCriterion(uiConfPeer::PARTNER_ID, $this->partner_id);
$crit_default = $c->getNewCriterion(uiConfPeer::DISPLAY_IN_SEARCH, mySearchUtils::DISPLAY_IN_SEARCH_KALTURA_NETWORK, Criteria::GREATER_EQUAL);
$crit_default_partner_id = $c->getNewCriterion(uiConfPeer::PARTNER_ID, $template_partner_id);
$crit_default_swf_url = $c->getNewCriterion(uiConfPeer::SWF_URL, '%/kdp3/%kdp3.swf', Criteria::LIKE);
$crit_default->addAnd($crit_default_partner_id);
$crit_default->addAnd($crit_default_swf_url);
$crit_partner->addOr($crit_default);
$c->add($crit_partner);
$c->addAnd(uiConfPeer::OBJ_TYPE, array(uiConf::UI_CONF_TYPE_WIDGET, uiConf::UI_CONF_TYPE_KDP3), Criteria::IN);
$c->addAnd(uiConfPeer::STATUS, uiConf::UI_CONF_STATUS_READY);
$c->addAnd(uiConfPeer::TAGS, '%' . $tag . '%', Criteria::LIKE);
$c->addAnd(uiConfPeer::TAGS, '%jw' . $tag . '%', Criteria::NOT_LIKE);
$c->addAnd(uiConfPeer::ID, array(48120, 48121, 48130, 48131, 48132, 48133, 48134, 48135), Criteria::NOT_IN);
$order_by = "(" . uiConfPeer::PARTNER_ID . "=" . intval($this->partner_id) . ")";
$c->addAscendingOrderByColumn($order_by);
$c->addDescendingOrderByColumn(uiConfPeer::CREATED_AT);
$confs = uiConfPeer::doSelect($c);
return $confs;
}
示例8: getAllKMCUiconfs
/**
*
* Gets all the kmc ui confs
* @param string $module_tag
* @param string $module_version
* @param int $template_partner_id
*/
public static function getAllKMCUiconfs($module_tag, $module_version, $template_partner_id)
{
$c = new Criteria();
$c->addAnd(uiConfPeer::PARTNER_ID, $template_partner_id);
// $c->addAnd(uiConfPeer::TAGS, "%".$module_tag."\_".$module_version."%", Criteria::LIKE); // no need to check for the kmc version
$c->addAnd(uiConfPeer::TAGS, "%autodeploy%", Criteria::LIKE);
return uiConfPeer::doSelect($c);
}
示例9: getSilverLightPlayerUiConfs
public static function getSilverLightPlayerUiConfs($tag)
{
$confs = array();
// implement query to get uiconfs from DB
$c = new Criteria();
$c->addAnd(uiConfPeer::DISPLAY_IN_SEARCH, mySearchUtils::DISPLAY_IN_SEARCH_KALTURA_NETWORK, Criteria::GREATER_EQUAL);
$c->addAnd(uiConfPeer::STATUS, uiConf::UI_CONF_STATUS_READY);
$c->addAnd(uiConfPeer::OBJ_TYPE, uiConf::UI_CONF_TYPE_SLP);
$c->addAnd(uiConfPeer::TAGS, $tag, Criteria::LIKE);
$c->addAscendingOrderByColumn(uiConfPeer::ID);
$slPlayers = uiConfPeer::doSelect($c);
$conf_players = array();
foreach ($slPlayers as $conf) {
$minRuntimeVersion = '';
$custom_data = unserialize($conf->getCustomData());
if ($custom_data) {
$minRuntimeVersion = $custom_data['minRuntimeVersion'];
}
$conf_players[] = array('id' => $conf->getId(), 'name' => $conf->getName(), 'width' => $conf->getWidth() ? $conf->getWidth() : 470, 'height' => $conf->getHeight() ? $conf->getHeight() : 600, 'minRuntimeVersion' => $minRuntimeVersion, 'swfUrlVersion' => self::getSlpUrlVersion($conf));
}
return $conf_players;
}