public static function fromDbArray(array $arr, KalturaDetachedResponseProfile $responseProfile = null) { $newArr = new KalturaServerNodeArray(); foreach ($arr as $obj) { $nObj = KalturaServerNode::getInstance($obj, $responseProfile); $newArr[] = $nObj; } return $newArr; }
private function addNewServerNode(KalturaServerNode $serverNode) { $dbServerNode = $serverNode->toInsertableObject(); /* @var $dbServerNode ServerNode */ $dbServerNode->setPartnerId($this->getPartnerId()); $dbServerNode->setStatus(ServerNodeStatus::DISABLED); $dbServerNode->save(); return $dbServerNode; }
public static function getInstance($sourceObject, KalturaDetachedResponseProfile $responseProfile = null) { $type = $sourceObject->getType(); switch ($type) { case KalturaServerNodeType::EDGE: $object = new KalturaEdgeServerNode(); break; default: $object = KalturaPluginManager::loadObject('KalturaServerNode', $type); if (!$object) { $object = new KalturaServerNode(); } break; } if (!$object) { return null; } $object->fromObject($sourceObject, $responseProfile); return $object; }
public function getMapBetweenObjects() { return array_merge(parent::getMapBetweenObjects(), self::$map_between_objects); }