public function toUpdatableObject($dbObject, $skip = array())
 {
     parent::toUpdatableObject($dbObject, $skip);
     if ($this->restrictions !== null && $this->restrictions instanceof KalturaRestrictionArray) {
         $dbObject->clearRestrictions();
         foreach ($this->restrictions as $restriction) {
             $dbRestriction = KalturaRestrictionFactory::getDbInstanceApiObject($restriction);
             $restriction->toObject($dbRestriction);
             $dbObject->setRestriction($dbRestriction);
         }
     }
 }
 public static function fromDbArray($arr)
 {
     $newArr = new KalturaRestrictionArray();
     if ($arr == null) {
         return $newArr;
     }
     foreach ($arr as $obj) {
         $nObj = KalturaRestrictionFactory::getInstanceByDbObject($obj);
         $nObj->fromObject($obj);
         $newArr[] = $nObj;
     }
     return $newArr;
 }