本文整理汇总了PHP中KalturaObject::toInsertableObject方法的典型用法代码示例。如果您正苦于以下问题:PHP KalturaObject::toInsertableObject方法的具体用法?PHP KalturaObject::toInsertableObject怎么用?PHP KalturaObject::toInsertableObject使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类KalturaObject
的用法示例。
在下文中一共展示了KalturaObject::toInsertableObject方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: toObject
public function toObject($dbData = null, $props_to_skip = array())
{
if (is_null($dbData)) {
$dbData = new kCopyJobData();
}
$dbData->setTemplateObject($this->templateObject->toInsertableObject());
return parent::toObject($dbData, $props_to_skip);
}
示例2: toInsertableObject
public function toInsertableObject($object_to_fill = null, $props_to_skip = array())
{
$object_to_fill = parent::toInsertableObject($object_to_fill, $props_to_skip);
if (empty($this->userId)) {
$currentKsKuser = kCurrentContext::getCurrentKsKuserId();
$object_to_fill->setKuserId($currentKsKuser);
} else {
$kuser = kuserPeer::getKuserByPartnerAndUid(kCurrentContext::$ks_partner_id, $this->userId);
if (!$kuser) {
throw new KalturaAPIException(KalturaErrors::INVALID_USER_ID, $this->userId);
}
$object_to_fill->setKuserId($kuser->getKuserId());
}
$object_to_fill->setPartnerId(kCurrentContext::getCurrentPartnerId());
return $object_to_fill;
}
示例3: toInsertableObject
/**
* @param Annotation $dbAnnotation
* @param array $propsToSkip
* @return Annotation
*/
public function toInsertableObject($dbAnnotation = null, $propsToSkip = array())
{
if (is_null($dbAnnotation)) {
$dbAnnotation = new Annotation();
}
return parent::toInsertableObject($dbAnnotation, $propsToSkip);
}
示例4: toInsertableObject
/**
* @param AuditTrail $dbAuditTrail
* @param array $propsToSkip
* @return AuditTrail
*/
public function toInsertableObject($dbAuditTrail = null, $propsToSkip = array())
{
if (is_null($dbAuditTrail)) {
$dbAuditTrail = new AuditTrail();
}
return parent::toInsertableObject($dbAuditTrail, $propsToSkip);
}
示例5: toInsertableObject
public function toInsertableObject($object_to_fill = null, $props_to_skip = array())
{
if (is_null($object_to_fill)) {
KalturaLog::alert("No object returned from toInsertableObject, object_to_fill [" . get_class($object_to_fill) . "], this [" . get_class($this) . "] line [" . __LINE__ . "]");
return null;
}
$dbObject = parent::toInsertableObject($object_to_fill, $props_to_skip);
if (!$dbObject) {
KalturaLog::alert("No object returned from toInsertableObject, object_to_fill [" . get_class($object_to_fill) . "], this [" . get_class($this) . "] line [" . __LINE__ . "]");
return null;
}
$pluginsData = $this->createPluginDataMap();
$dbObject->setPluginsData($pluginsData);
return $dbObject;
}
示例6: toInsertableObject
public function toInsertableObject($dbAppToken = null, $skip = array())
{
$partnerId = kCurrentContext::getCurrentPartnerId();
$partner = PartnerPeer::retrieveByPK($partnerId);
if ($this->isNull('sessionDuration')) {
$this->sessionDuration = $partner->getKsMaxExpiryInSeconds();
}
$dbAppToken = parent::toInsertableObject($dbAppToken, $skip);
/* @var $dbAppToken AppToken */
$dbAppToken->setPartnerId($partnerId);
$dbAppToken->setToken(bin2hex(openssl_random_pseudo_bytes(16)));
$dbAppToken->setStatus(AppTokenStatus::ACTIVE);
return $dbAppToken;
}
示例7: toInsertableObject
public function toInsertableObject($object_to_fill = null, $props_to_skip = array())
{
$hasPrivacyContext = false;
if ($this->privacyContext) {
$hasPrivacyContext = true;
} elseif ($this->parentId != null) {
$parentCategory = categoryPeer::retrieveByPK($this->parentId);
if (!$parentCategory) {
throw new KalturaAPIException(KalturaErrors::CATEGORY_NOT_FOUND, $this->parentId);
}
if ($parentCategory->getPrivacyContexts()) {
$hasPrivacyContext = true;
}
}
if ($hasPrivacyContext) {
if (!$this->owner && $this->inheritanceType != KalturaInheritanceType::INHERIT) {
if (kCurrentContext::getCurrentKsKuser()) {
$this->owner = kCurrentContext::getCurrentKsKuser()->getPuserId();
}
}
}
return parent::toInsertableObject($object_to_fill, $props_to_skip);
}
示例8: toInsertableObject
public function toInsertableObject($object_to_fill = null, $props_to_skip = array())
{
if (is_null($object_to_fill)) {
$object_to_fill = new StorageProfile();
}
return parent::toInsertableObject($object_to_fill, $props_to_skip);
}
示例9: toInsertableObject
public function toInsertableObject($dbObject = null, $skip = array())
{
if (is_null($this->permissionLevel)) {
$category = categoryPeer::retrieveByPK($this->categoryId);
if (!$category) {
throw new KalturaAPIException(KalturaErrors::CATEGORY_NOT_FOUND, $this->categoryId);
}
$this->permissionLevel = $category->getDefaultPermissionLevel();
}
return parent::toInsertableObject($dbObject, $skip);
}
示例10: toInsertableObject
public function toInsertableObject($object_to_fill = null, $props_to_skip = array())
{
return parent::toInsertableObject(new mediaInfo(), $props_to_skip);
}
示例11: toInsertableObject
public function toInsertableObject($object_to_fill = null, $props_to_skip = array())
{
if (is_null($object_to_fill)) {
$object_to_fill = new EdgeServer();
}
return parent::toInsertableObject($object_to_fill, $props_to_skip);
}
示例12: toInsertableObject
public function toInsertableObject($object_to_fill = null, $props_to_skip = array())
{
$dbObject = parent::toInsertableObject(new BulkUploadResult(), $props_to_skip);
$pluginsData = array();
if ($this->pluginsData && $this->pluginsData instanceof KalturaBulkUploadPluginDataArray) {
foreach ($this->pluginsData as $data) {
// KalturaLog::debug("Plugins data item is " . get_class($data));
if ($data instanceof KalturaBulkUploadPluginData) {
$pluginsData[$data->field] = $data->value;
}
}
}
KalturaLog::debug("Plugins data array:\n" . print_r($pluginsData, true));
$dbObject->setPluginsData($pluginsData);
return $dbObject;
}
示例13: toInsertableObject
public function toInsertableObject($objectToFill = null, $propertiesToSkip = array())
{
if (is_null($this->status)) {
$this->status = KalturaScheduledTaskProfileStatus::DISABLED;
}
return parent::toInsertableObject($objectToFill, $propertiesToSkip);
}