判断域名是否有权限访问
@return type
196547
public static function checkDomain()
	{
		$domain = Config::get('@.DOMAIN');
		return empty($domain) || !Config::get('@.FILTER_DOMAIN') || $domain === Request::server('HTTP_HOST');
	}
585169
public function getType() {
        if($this->typeInstance !== null) {
            return $this->typeInstance;
        }

        if(isset(static::$types[$this->type])) {
            $this->typeInstance = static::$types[$this->type];

            return static::$types[$this->type];
        } else {
            if(static::$defaultType !== null) {
                $this->typeInstance = static::$defaultType;

                return static::$defaultType;
            } else {
                throw new Exception('No `FieldType` Object Set For Field Type "' . $this->type . '" And No Default Set');
            }
        }
    }
1220327
public function type()
    {
        if ($this->type === null) {
            $this->type = self::DEFAULT_INPUT_TYPE;
        }

        return $this->type;
    }
1321952
public static function contentType() {
        //检测请求头
        $contentType = '';
        // Look for the content type header
        if (isset ($_SERVER ["HTTP_CONTENT_TYPE"])) {
            $contentType = $_SERVER ["HTTP_CONTENT_TYPE"];
        } else if (isset ($_SERVER ["CONTENT_TYPE"])) {
            $contentType = $_SERVER ["CONTENT_TYPE"];
        }

        return $contentType;
    }
664099
public static function getTypes() {
        return array(
            self::TYPE_CHARACTER,
            self::TYPE_LOGICAL,
            self::TYPE_DATE ,
            self::TYPE_NUMERIC,
            self::TYPE_MEMO,
        );
    }
130946
public function getType()
    {
        if (null === $this->type) {
            $this->type = $this->getCallableType($this->handler);
        }

        return $this->type;
    }
281719
public function getType()
    {
        if($this->_type == null) {
            $this->_type = parse_url($this->_path, PHP_URL_HOST);
        }

        return $this->_type;
    }
110001
public function types()
    {
        if ($this->types === null) {
            $this->types = [];

            $grav = Grav::instance();

            /** @var UniformResourceLocator $locator */
            $locator = $grav['locator'];

            // Get stream / directory iterator.
            if ($locator->isStream($this->search)) {
                $iterator = $locator->getIterator($this->search);
            } else {
                $iterator = new \DirectoryIterator($this->search);
            }

            /** @var \DirectoryIterator $file */
            foreach ($iterator as $file) {
                if (!$file->isFile() || '.' . $file->getExtension() !== YAML_EXT) {
                    continue;
                }
                $name = $file->getBasename(YAML_EXT);
                $this->types[$name] = ucfirst(str_replace('_', ' ', $name));
            }
        }

        return $this->types;
    }
437187
public static function getTypesMap()
    {
        return array_map(
            static function (Type $type) : string {
                return get_class($type);
            },
            self::getTypeRegistry()->getMap()
        );
    }
140144
public function getType() {
		if ($this->moufManager->getCode($this->getIdentifierName())===null) {
			return self::TYPE_DECLARATIVE;
		} else {
			return self::TYPE_PHP;
		}
	}
905839
public static function getType()
    {
        $clsInfo = explode('\\', get_called_class());
        $namespaceParts = array_slice($clsInfo, 0, -1);
        // convention: AdminType classes are placed into the "<bundle>\Element\Type" namespace
        $namespaceParts[] = "Type";
        $bareClassName = implode('', array_slice($clsInfo, -1));
        // convention: AdminType class name is the same as the element class name suffixed with AdminType
        return implode('\\', $namespaceParts) . '\\' . $bareClassName . 'AdminType';
    }
84262
public function getTypes()
    {
        $oDb     = Factory::service('Database');
        $oResult = $oDb->query('SHOW COLUMNS FROM `' . $this->table . '` LIKE "type"')->row();
        $sTypes  = $oResult->Type;
        $sTypes  = preg_replace('/enum\((.*)\)/', '$1', $sTypes);
        $sTypes  = str_replace("'", '', $sTypes);
        $aTypes  = explode(',', $sTypes);

        $aOut = [];

        foreach ($aTypes as $sType) {
            $aOut[$sType] = ucwords(strtolower($sType));
        }

        return $aOut;
    }
91273
public static function getTypeName($type)
    {
        return isset(self::$names[$type])
            ? self::$names[$type]
            : null;
    }
1354440
public function getTypes()
    {
        $schema = StaticSchema::inst();
        $tree = array_merge(
            [$this->rootClass],
            $schema->getDescendants($this->rootClass)
        );

        return array_map(function ($class) use ($tree, $schema) {
            return $schema->typeNameForDataObject($class);
        }, $tree);
    }
292118
public function getTypes() {
		$types = $this->find()
			->select(['type'])
			->distinct('type')
			->order('type ASC')
			->disableHydration()
			->toArray();

		return Hash::combine($types, '{n}.type', '{n}.type');
	}
562644
public function getCurrentType()
    {
        if (null !== $index = $this->getCurrencyIndex()) {
            return $index->getType();
        }

        $types = $this->repository->listIndexableEntityTypes();
        $type = array_shift($types);

        return $type;
    }
123802
public function getType() : int
    {
        $query = 'SELECT type_id FROM info LIMIT 1';

        $typeId = Type::UNKNOWN;
        foreach ($this->getAdapter()->query($query) as $row) {
            $typeId = (int)$row['type_id'];
        }

        return $typeId;
    }