Returns a type from our registry

@param string $type
@param bool $isEntityId

@return Type
778908
private function getTypeFromRegistry(string $type, bool $isEntityId): Type
    {
        if ($this->types->isEntity($type) && $isEntityId) {
            return $this->types->getId($type);
        }

        if ($this->types->isEntity($type) && !$isEntityId) {
            return $this->types->getOutput($type);
        }

        return $this->types->get($type);
    }
665681
public function isSatisfiedBy(ReturnType\TypeInterface $type)
    {
        return $type->isRealType() && Types::T_BOOL == $type->getDataType();
    }
999875
public function getNavTypes($type, $types)
    {
        if ($type === null) {
            return $types;
        }

        return $this->filterTypes($types, $this->getTypeCategory($type));
    }
872724
protected function getResultsByType($type)
    {
        $instance = $this->createModelByType($type);

        $key = $instance->getKeyName();

        $query = $instance->newQuery();

        $query = $this->useWithTrashed($query);

        return $query->whereIn($key, $this->gatherKeysByType($type)->all())->get();
    }
1162056
public static function getInstance($type, $init)
    {

        if (!self::$cachingInstance) {
            self::$cachingInstance = new SessionCache($type, $init);
        }

        return self::$cachingInstance;
    }
749745
public function getImportObject($type)
    {
        $this->importType = $type;
        $result = null;
        try {
            $importType = $this->getImportType();
            $result = $this->createImportObject($importType);
        } catch (Exception $e) {
        }

        return $result;
    }
458496
private function inflateType($identifier, $type = Scope::class)
    {
        if ($identifier === null) {
            return null;
        }

        return $this->entityManager->find($type, $identifier);
    }
1205929
public function getEntityTypes($type = false) {
        //Check if server version is 0.15 or Greater 
        if ($this->checkVersion("0.15.0", ">=")) {
            if (isset($this->_entityTypes)) {
                return $this->_entityTypes;
            } else {
                if($type){
                    $url = $this->serverUrl .  $this->apiversion . "/contextTypes/$type";
                }else{
                    $url = $this->serverUrl . $this->apiversion . "/contextTypes";
                }
                $ret = $this->restRequest($url, 'GET')->getResponseBody();

                $Context = new Context\Context($ret);
                if (is_object($Context->__toObject()) && isset($Context->__toObject()->types)) {
                    $types = $Context->__toObject()->types;

                    foreach ($types as $t) {
                        $Columns[$t->name] = $t->attributes;
                    }
                    $this->_entityTypes = $Columns;
                    return $this->_entityTypes;
                } else {
                    throw new Exception('Invalid Request', 500, null);
                }
            }
        } else {
            throw new Exception('Not Supported in this currently Orion Version', 500, null);
        }
    }
739640
public function is($type = null)
    {
        if ($type === null) {
            return $this->is;
        } else {
            return $type == $this->is;
        }
    }
36650
public function findRegistriesEntityById($identifier, $id)
    {
        $sql = 'SELECT * FROM registry AS r WHERE (r.type = :identifier OR r.scope = :identifier) AND ((r.key = "identifier" AND r.value = :id) OR (r.scope = :id))';
        $query = $this->_em->createNativeQuery($sql, $this->getResultSetMapping());
        $query->setParameters(array('identifier' => $identifier,
            'id' => $id,
            )
        );

        return $query->getResult();
    }
415158
public function getEntityById($id)
    {
        return isset($this->entitiesById[$id]) ? $this->entitiesById[$id] : null;
    }
180960
public final static function get($type = 'default') {
        if (!isset(self::$INSTANCES[ $type ])) {
            $defaultPassport = apply_filter('passport\new' . ucfirst($type) . 'Passport', new Passport());
            $passport        = sess_get(self::SESSION_NAME . '_' . $type);
            if ($passport) {
                if (function_exists('igbinary_unserialize')) {
                    self::$INSTANCES[ $type ] = @igbinary_unserialize($passport);
                } else {
                    self::$INSTANCES[ $type ] = @unserialize($passport);
                }
            } else {
                $defaultPassport->type    = $type;
                self::$INSTANCES[ $type ] = $defaultPassport;
            }
        }

        return self::$INSTANCES[ $type ];
    }
249067
public static function getInstance($type, $init)
    {

        if (!self::$cachingInstance) {
            self::$cachingInstance = new DatabaseCache($type, $init);
        }

        return self::$cachingInstance;
    }
1213189
public static function get($type)
    {
        if (!isset(static::$_modelFactories['Table'])) {
            static::$_modelFactories['Table'] = [TableRegistry::getTableLocator(), 'get'];
        }

        if (!isset(static::$_modelFactories[$type])) {
            throw new InvalidArgumentException(sprintf(
                'Unknown repository type "%s". Make sure you register a type before trying to use it.',
                $type
            ));
        }

        return static::$_modelFactories[$type];
    }
326707
public function type($type = null)
    {
        if (!func_num_args()) {
            return $this->_type;
        }
        $this->_type = $type;
        return $this;
    }
1131739
private static function getEntityType($owningEntity, $key)
    {
        $config = self::getConfig();
        $owningClass = ClassUtils::getClass($owningEntity);
        if (isset($config[$owningClass][$key])) {
            return $config[$owningClass][$key]['type'];
        }

        return null;
    }
643616
function registerTypeByName(type) {
    if (registryLogger.isDebugEnabled()) {
        registryLogger.debug('Register Type \'%s\' by name [%s]', type.id, type.typeName);
    }
    typeByName[type.typeName] = type;
    return type;
}