本文整理汇总了PHP中entry::setId方法的典型用法代码示例。如果您正苦于以下问题:PHP entry::setId方法的具体用法?PHP entry::setId怎么用?PHP entry::setId使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类entry
的用法示例。
在下文中一共展示了entry::setId方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: executeImpl
public function executeImpl($partner_id, $subp_id, $puser_id, $partner_prefix, $puser_kuser)
{
$prefix = $this->getObjectPrefix();
$entry_id = $this->getPM("{$prefix}_id");
$detailed = false;
//$this->getP ( "detailed" , false );
$version = $this->getP("version", false);
$entry = new entry();
$entry->setId($entry_id);
/*
$c = $this->getCriteria();
if ( $c == null )
{
$entry = entryPeer::retrieveByPK( $entry_id );
}
else
{
$c->add ( entryPeer::ID , $entry_id );
$entry = entryPeer::doSelectOne( $c );
}
*/
if (!$entry) {
$this->addError(APIErrors::INVALID_ENTRY_ID, $prefix, $entry_id);
} else {
$level = $detailed ? objectWrapperBase::DETAIL_LEVEL_DETAILED : objectWrapperBase::DETAIL_LEVEL_REGULAR;
$roughcuts = $entry->getRoughcuts();
$this->addMsg("count", count($roughcuts));
$this->addMsg("roughcuts", objectWrapperBase::getWrapperClass($roughcuts, $level));
}
}
示例2: executeImpl
public function executeImpl($partner_id, $subp_id, $puser_id, $partner_prefix, $puser_kuser)
{
$prefix = $this->getObjectPrefix();
if (!$puser_kuser) {
$this->addError(APIErrors::INVALID_USER_ID, $puser_id);
return;
}
$allow_empty = $this->getP("allow_empty_field", false);
if ($allow_empty == "false" || $allow_empty === 0) {
$allow_empty = false;
}
$entry_id = $this->getPM("{$prefix}_id");
$entry = entryPeer::retrieveByPK($entry_id);
if (!$entry) {
$this->addError(APIErrors::INVALID_ENTRY_ID, $prefix, $entry_id);
return;
}
$this->validateInputEntry($entry);
// TODO - verify the user is allowed to modify the entry
if (!$this->isOwnedBy($entry, $puser_kuser->getKuserId())) {
$this->verifyEntryPrivileges($entry);
// user was granted explicit permissions when initiatd the ks
}
// get the new properties for the kuser from the request
$entry_update_data = new entry();
// assume the type and media_type of the entry from the DB are the same as those of the one from the user - if not -they will be overriden
$entry_update_data->setType($entry->getType());
$entry_update_data->setMediaType($entry->getMediaType());
$entry_update_data->setId($entry->getId());
$entry_update_data->setPartnerId($entry->getPartnerId());
$entry_update_data->setData($entry->getData(), true);
$obj_wrapper = objectWrapperBase::getWrapperClass($entry_update_data, 0);
$field_level = $this->isAdmin() ? 2 : 1;
$updateable_fields = $obj_wrapper->getUpdateableFields($field_level);
$fields_modified = baseObjectUtils::fillObjectFromMap($this->getInputParams(), $entry_update_data, "{$prefix}_", $updateable_fields, BasePeer::TYPE_PHPNAME, $allow_empty);
if (count($fields_modified) > 0) {
if ($entry_update_data) {
// allow admins to set admin more fields
baseObjectUtils::fillObjectFromObject($updateable_fields, $entry_update_data, $entry, baseObjectUtils::CLONE_POLICY_PREFER_NEW, null, BasePeer::TYPE_PHPNAME, $allow_empty);
}
$this->validateEntry($entry);
// TODO - chack to see that the permissions changed, not just any attributes
myNotificationMgr::createNotification(kNotificationJobData::NOTIFICATION_TYPE_ENTRY_UPDATE_PERMISSIONS, $entry);
$entry->save();
}
$wrapper = objectWrapperBase::getWrapperClass($entry, objectWrapperBase::DETAIL_LEVEL_DETAILED);
$wrapper->removeFromCache("entry", $entry->getId());
$this->addMsg("{$prefix}", $wrapper);
$this->addDebug("modified_fields", $fields_modified);
}
示例3: getStatsFromContentAction
/**
* Retrieve playlist statistics
*
* @action getStatsFromContent
* @param KalturaPlaylistType $playlistType
* @param string $playlistContent
* @return KalturaPlaylist
*/
function getStatsFromContentAction($playlistType, $playlistContent)
{
myDbHelper::$use_alternative_con = myDbHelper::DB_HELPER_CONN_PROPEL3;
$dbPlaylist = new entry();
$dbPlaylist->setId(-1);
// set with some dummy number so the getDataContent will later work properly
$dbPlaylist->setType(entryType::PLAYLIST);
// prepare the playlist type before filling from request
$dbPlaylist->setMediaType($playlistType);
$dbPlaylist->setDataContent($playlistContent);
myPlaylistUtils::updatePlaylistStatistics($this->getPartnerId(), $dbPlaylist);
//, $extra_filters , $detailed );
$playlist = new KalturaPlaylist();
// start from blank
$playlist->fromObject($dbPlaylist, $this->getResponseProfile());
return $playlist;
}
示例4: setId
public function setId($v)
{
if (!$this->getId()) {
parent::setId($v);
}
}