Fetches some information about subnet object

@param int $objectID Object identifier

@return self Returns itself

@throws Exception on error
485021
public function load($objectID) {
        $category = new CMDBCategory($this->api);
        $netInfo = $category->read($objectID, 'C__CATS__NET');

        if (count($netInfo) !== 1 ||
            !array_key_exists(0, $netInfo) ||
            !is_array($netInfo[0])) {
            throw new RuntimeException(sprintf(
                'Nothing found for object identifier %s',
                $objectID
            ));
        }

        if (!array_key_exists('type', $netInfo[0]) ||
            !is_array($netInfo[0]['type']) ||
            !array_key_exists('const', $netInfo[0]['type']) ||
            !is_string($netInfo[0]['type']['const']) ||
            $netInfo[0]['type']['const'] !== 'C__CATS_NET_TYPE__IPV4') {
            throw new RuntimeException('Works only for IPv4');
        }

        if (!array_key_exists('range_from', $netInfo[0]) ||
            !is_string($netInfo[0]['range_from']) ||
            !array_key_exists('range_to', $netInfo[0]) ||
            !is_string($netInfo[0]['range_to'])) {
            throw new RuntimeException(sprintf(
                'Subnet #%s has no IP address range',
                $objectID
            ));
        }

        $this->first = $this->convertIPv4Address($netInfo[0]['range_from']);
        $this->last = $this->convertIPv4Address($netInfo[0]['range_to']);

        $takenIPAddresses = $category->read($objectID, 'C__CATS__NET_IP_ADDRESSES');

        foreach ($takenIPAddresses as $takenIPAddress) {
            $this->taken[] = $takenIPAddress['title'];
        }

        $this->current = $this->first;

        return $this;
    }
768919
public function details($transactionId)
    {
        $transactionData = $this->getTransactionResource()->get($transactionId);

        if ($transactionData instanceof \Exception) {
            throw $transactionData;
        }

        return TransactionObject::make($transactionData);
    }
874249
protected function loadCollection($collectionId)
    {
        $collection = $this->ezInfoCollectionRepository->findOneBy(['id' => $collectionId]);

        $content = $this->contentService->loadContent($collection->getContentObjectId());

        $contentType = $this->contentTypeService->loadContentType($content->contentInfo->contentTypeId);
        $definitionsById = $contentType->fieldDefinitionsById;

        $collections = $this->ezInfoCollectionAttributeRepository->findBy(
            [
                'informationCollectionId' => $collectionId,
            ]
        );

        $attributes = [];
        /** @var EzInfoCollectionAttribute $coll */
        foreach ($collections as $coll) {

            if (empty($definitionsById[$coll->getContentClassAttributeId()])) {
                continue;
            }

            $attributes[] = new Attribute([
                'entity' => $coll,
                'field' => $definitionsById[$coll->getContentClassAttributeId()],
            ]);

        }

        return new Collection([
            'entity' => $collection,
            'attributes' => $attributes,
            'user' => $this->getUser($collection->getCreatorId()),
            'content' => $content,
        ]);
    }
928249
public function getObjectUrl($repositoryId, $objectId, $selector = null)
    {
        if ($this->getRootUrl($repositoryId) === null) {
            return null;
        }

        $url = $this->buildUrl($this->getRootUrl($repositoryId));
        $urlQuery = $url->getQuery();
        $urlQuery->modify([Constants::PARAM_OBJECT_ID => (string) $objectId]);

        if (!empty($selector)) {
            $urlQuery->modify([Constants::PARAM_SELECTOR => (string) $selector]);
        }

        return $url;
    }
685074
public function recycle(array $objectIDs) {
        $requests = [];

        foreach ($objectIDs as $objectID) {
            $requests[] = [
                'method' => 'cmdb.object.recycle',
                'params' => [
                    'object' => $objectID
                ]
            ];
        }

        $this->api->batchRequest($requests);

        return $this;
    }
147509
public function getEntity($entityId)
    {
        //test the entity name
        if ($entityId == null) {
            throw new \Exception('The businessEntityId is not defined for the entityProxy with the id:'.$this->getId());
        }

        $functionName = 'get'.ucfirst($entityId);
        $entity = call_user_func([$this, $functionName]);

        return $entity;
    }
680113
private function getObjectTitle($type, $objectId)
    {
        $objectModel = $this->getObjectModel($type);
        $objectModel->load($objectId);

        $fieldName = $this->getObjectTitleFieldName($type);
        $field = $objectModel->$fieldName;

        return $field->value;
    }
814192
public function get(string $oid): Ext\Extension
    {
        if (!$this->has($oid)) {
            throw new \LogicException("No extension by OID $oid.");
        }
        return $this->_extensions[$oid];
    }
800406
protected function getObjectIdsForNodeIds(array $nodeIds)
    {
        $objectIds = array();

        foreach ($nodeIds as $nodeId) {
            $object = eZContentObject::fetchByNodeID($nodeId);
            if ($object instanceof eZContentObject) {
                $objectIds[] = $object->attribute('id');
            }
        }

        return $objectIds;
    }
1048288
public function isValidObjectId($objectId)
    {
        //====================================================================//
        // Checks Id is not Null
        if (is_null($objectId)) {
            return Splash::log()->err('ErrEmptyObjectId');
        }
        //====================================================================//
        // Checks Id is String or Int
        if (!is_string($objectId) && !is_numeric($objectId)) {
            return Splash::log()->err('ErrWrongObjectId');
        }
        //====================================================================//
        // Checks List Not Empty
        if (is_numeric($objectId) && ($objectId < 0)) {
            return Splash::log()->err('ErrNegObjectId');
        }

        return Splash::log()->deb('MsgObjectIdOk');
    }
105410
private function getObjInfo($objectId)
    {
        //映射不存在 ,则先创建
        if(empty($this->m_objectInfoMap)){
            $configData=$this->m_config->getConfigValues($this->m_configSection);
            $this->m_objectInfoMap=$this->loadObjMap($configData);
        }

        //对象信息
        if(array_key_exists($objectId, $this->m_objectInfoMap)){
            return $this->m_objectInfoMap[$objectId];
        }
        return null;
    }
734883
public function getDevice($deviceId)
    {
        if (!isset($this->_deviceCache[$deviceId])) {
            $device = $this->persistenceStorage->load($deviceId);
            if (!$device) {
                throw new Exception("There is no device with ID [$deviceId] in the loaded WURFL Data");
            }
            $this->_deviceCache[$deviceId] = $device;
        }
        return $this->_deviceCache[$deviceId];
    }
872356
public function getCollectionById($collectionId)
    {
        $collection = $this->collectionRepository->find($collectionId);
        if (!$collection) {
            throw new CollectionNotFoundException($collectionId);
        }

        return $collection;
    }
759337
public function collection($collectionId)
    {
        return new CollectionReference(
            $this->connection,
            $this->valueMapper,
            $this->childPath($this->name, $collectionId)
        );
    }
857467
protected function loadNode(ObjectId $oid) {
    // check if we already loaded the node
    if ($this->isRegistered($oid)) {
      return;
    }
    $persistenceFacade = $this->getPersistenceFacade();

    // restore the request values from session
    $language = $this->getRequestValue('language');
    $translateValues = StringUtil::getBoolean($this->getRequestValue('translateValues'));

    // load the node
    $node = $persistenceFacade->load($oid);
    if ($node == null) {
      throw new PersistenceException("Can't load node '".$oid."'");
    }

    // translate all nodes to the requested language if requested
    if ($this->isLocalizedRequest()) {
      $localization = $this->getLocalization();
      $node = $localization->loadTranslation($node, $language, true, true);
    }

    // translate values if requested
    if ($translateValues) {
      $nodes = [$node];
      if ($this->isLocalizedRequest()) {
        NodeUtil::translateValues($nodes, $language);
      }
      else {
        NodeUtil::translateValues($nodes);
      }
    }

    // assign it to the response
    $this->addNodeToResponse($node);

    $this->register($oid);

    $logger = $this->getLogger();
    if ($logger->isInfoEnabled()) {
      $logger->info("Loaded: ".$node->getOID());
    }
    if ($logger->isDebugEnabled()) {
      $logger->debug($node->toString());
    }
  }
542800
public static function load($id, $subId = null) : CacheEntryInterface
    {
        $storageId = $id;

        if ($subId) {
            $storageId .= '[' . $subId . ']';
        }

        if (!isset(self::$files[$storageId])) {
            $filename = static::CACHE_DIR . ($subId ? $subId . '/' : null) . urlencode($id) . '.' . static::CACHE_EXTENSION;
            self::$files[$storageId] = new File($filename);
        }

        return self::$files[$storageId];
    }
52289
protected function getSubdomain( $subdomainId = null )
    {
        static $subdomains = array();
        $siteInfo = $this->getSiteInfo();

        if ( empty( $subdomainId ) || $siteInfo->getSubdomainId() == $subdomainId )
        {
            return $siteInfo->getSubdomain();
        }

        if ( ! isset( $subdomains[$subdomainId] ) )
        {
            /* @var $model \Grid\Core\Model\Uri\Model */
            $service    = $this->getServiceLocator();
            $model      = $service->get( 'Grid\Core\Model\SubDomain\Model' );
            $subdomain  = $model->find( $subdomainId );

            if ( empty( $subdomain ) )
            {
                $subdomains[$subdomainId] = '';
            }
            else
            {
                $subdomains[$subdomainId] = $subdomain->subdomain;
            }
        }

        return $subdomains[$subdomainId];
    }