public function fromObject($dbObject)
 {
     parent::fromObject($dbObject);
     if (!$dbObject instanceof accessControl) {
         return;
     }
     $rules = $dbObject->getRulesArray();
     foreach ($rules as $rule) {
         if (!$rule instanceof kAccessControlRestriction) {
             KalturaLog::info("Access control [" . $dbObject->getId() . "] rules are new and cannot be loaded using old object");
             $this->containsUnsuportedRestrictions = true;
             return;
         }
     }
     $this->restrictions = KalturaRestrictionArray::fromDbArray($rules);
 }
Пример #2
0
 public function fromObject($dbObject)
 {
     parent::fromObject($dbObject);
     if ($dbObject instanceof accessControl) {
         $dbRestrictions = $dbObject->getRestrictions();
         $this->restrictions = KalturaRestrictionArray::fromDbArray($dbRestrictions);
     }
 }
Пример #3
0
 public function doFromObject($dbObject, KalturaDetachedResponseProfile $responseProfile = null)
 {
     parent::doFromObject($dbObject, $responseProfile);
     if (!$dbObject instanceof accessControl) {
         return;
     }
     if ($this->shouldGet('restrictions', $responseProfile)) {
         $rules = $dbObject->getRulesArray();
         foreach ($rules as $rule) {
             if (!$rule instanceof kAccessControlRestriction) {
                 KalturaLog::info("Access control [" . $dbObject->getId() . "] rules are new and cannot be loaded using old object");
                 $this->containsUnsuportedRestrictions = true;
                 return;
             }
         }
         $this->restrictions = KalturaRestrictionArray::fromDbArray($rules);
     }
 }