Retrieve Product Emulator (Magento Object) by type identifier.

@param string $typeId Type identifier.

@return \Magento\Framework\DataObject
340864
protected function getProductEmulator($typeId)
    {
        if (!isset($this->productEmulators[$typeId])) {
            $productEmulator = new \Magento\Framework\DataObject();
            $productEmulator->setTypeId($typeId);
            $this->productEmulators[$typeId] = $productEmulator;
        }

        return $this->productEmulators[$typeId];
    }
569053
public function get($schemaId)
    {
        $class = $this->getSchemaClass();
        $data = static::$schemas[$schemaId];
        /** @var Schema $schema */
        $schema = call_user_func([$class, 'deserializeObject'], $data);
        $schema->getMeta()->setLocation($this->schemasEndpointUrl.$schemaId);

        return $schema;
    }
77568
public function insertType(Type $type, $typeId = null)
    {
        try {
            return $this->innerGateway->insertType($type, $typeId);
        } catch (DBALException $e) {
            throw new RuntimeException('Database error', 0, $e);
        } catch (PDOException $e) {
            throw new RuntimeException('Database error', 0, $e);
        }
    }
99449
public function get($type)
    {
        if (!isset($this->instances[$type])) {

            if (!isset($this->services[$type])) {
                if ($this->debug) {
                    trigger_error(sprintf("Widget type '%s' does not exist, returning a null implementation", $type), E_USER_ERROR);
                }
                // This primarily meant to display stuff, we should never WSOD
                // in the user's face, return a null object instead that will
                // UI operations smooth and error tolerant.
                return new NullWidget();
            }

            $this->instances[$type] = $this->container->get($this->services[$type]);
        }

        return $this->instances[$type];
    }
958608
public function load($objectId)
    {
        $success = null;
        $value   = $this->adapter->getItem($objectId, $success);

        if ($success) {
            return $value;
        }

        return null;
    }
424224
public static function objectType($fieldId)
    {
        //====================================================================//
        // decode
        $result = self::isIdField($fieldId);
        if (empty($result)) {
            return false;
        }
        //====================================================================//
        // Return Field Identifier
        return   $result['ObjectType'];
    }
814192
public function get(string $oid): Ext\Extension
    {
        if (!$this->has($oid)) {
            throw new \LogicException("No extension by OID $oid.");
        }
        return $this->_extensions[$oid];
    }
1047026
protected function getThing($typeof, $resourceId, ContextInterface $context)
    {
        /** @var TypeInterface[] $types */
        $types = [];
        if (strlen($typeof)) {
            foreach (preg_split('/\s+/', $typeof) as $prefixedType) {
                $types[] = $this->getType($prefixedType, $context);
            }
        }

        return new Thing($types, $resourceId);
    }
756432
public function getPointEvent($typeId = null)
    {
        $this->buildQuery();
        $query = $this->eventQuery;

        if(! is_null($typeId)){
            $query->where('point_event_type_id' ,$typeId);
        }

        return $this->doQuery();
    }
589053
protected function findProductModelById(string $id): ?ProductInterface
    {
        /**
         * @var ProductInterface
         */
        $class = $this->modelBuilder->getInterfaceClass($this->config, ProductInterface::class);

        return $class::findProductBy1c($id);
    }
691009
public function getCommunityById($communityId)
    {
        if (!$this->apiVersionIsGreaterThanV3()) {
            throw new EndpointNotSupportedByApiVersionException();
        }

        if (!is_string($communityId)) {
            throw new InvalidTypeException('Community ID', 'string', gettype($communityId));
        }

        return $this->get(sprintf('communities/%s', $communityId));
    }
298248
public function findOne($productId)
    {
        $this->useAlternateEndpoint = true;
        $this->queryParams['ProductIds'] = $productId;
        $this->addAllProductImages();
        $this->addAllShopLogos();
        $response = $this->send();
        $products = $response->getProducts();
        if (isset($products[0])) {
            return $products[0];
        }

        return null;
    }
43655
public function get( $id ) {
		if ( isset( $this->types[ $id ] ) ) {
			return $this->types[ $id ];
		}

		return null;
	}
1024460
public static function getByID($logID)
    {
        $app = Application::getFacadeApplication();
        $db = $app->make('database')->connection();
        $row = $db->fetchAssoc('select * from Logs where logID = ?', [$logID]);
        if ($row) {
            $obj = new static();
            $obj = array_to_object($obj, $row);

            return $obj;
        }
    }
12222
public function getById($widgetId)
    {
        $this->getLogger()->info('Getting widget ID ' . $widgetId);
        $response = $this->doGet('/playlist/widget', [
            'widgetId' => $widgetId
        ]);

        $resonse = clone $this->hydrate($response[0]);
        if ($response[0]['type'] != $this->type)
            throw new XiboApiException('Invalid widget type');

        return $this;
    }
676884
public function getByType( $parentId, $parentType, $type ) {

		$modelClass = static::$modelClass;

		return $modelClass::findByType( $parentId, $parentType, $type );
	}
1223519
public function loadContentType($contentTypeId)
    {
        $contentType = $this->contentTypeService->loadContentType($contentTypeId, Language::ALL);

        return new Values\RestContentType(
            $contentType,
            $contentType->getFieldDefinitions()
        );
    }