public function validateForInsert($propertiesToSkip = array())
 {
     if (is_null($this->contentMatchPolicy)) {
         throw new KalturaAPIException(KalturaErrors::PROPERTY_VALIDATION_CANNOT_BE_NULL, get_class($this) . '::contentMatchPolicy');
     }
     return parent::validateForInsert($propertiesToSkip);
 }
示例#2
0
 public function toInsertableObject($object_to_fill = null, $props_to_skip = array())
 {
     $this->validateForInsert($props_to_skip);
     // will check that not insertable properties are not set
     $this->fileHandlerConfig->validateForInsert();
     $result = $this->toObject($object_to_fill, $props_to_skip);
     if (!is_null($this->fileHandlerConfig)) {
         $dbInsertedHandlerConfig = $this->fileHandlerConfig->toInsertableObject();
         $result->setFileHandlerConfig($dbInsertedHandlerConfig);
     }
     return $result;
 }