检测字符$prefix是否是通过URL定义的分组.

@param string $prefix

@return null|string
515294
public static function checkUrlPrefix($prefix) {
        return isset(self::$prefix['check'][ $prefix ]) ? self::$prefix['check'][ $prefix ] : null;
    }
749809
public function hasPrefix(string $prefix):bool {
        if (0 !== $this->getLength() && "" === $prefix) return false;
        return true === (substr( $this->getValue(), 0, strlen($prefix)) === $prefix);
    }
345202
protected function getNamespaceURI($prefix)
    {
        $namespaces = $this->owner->config()->open_graph_namespaces;
        
        if (isset($namespaces[$prefix])) {
            return $namespaces[$prefix];
        }
    }
478651
public function setPrefix(string $prefix): RouteInterface
    {
        if (!preg_match(
                "/^([A-Z]{1}[a-zA-Z_0-9]{1,31}(\/{1})?){1,5}$/",
                $prefix)) {
            throw new InvalidArgumentException(
                "Can't set prefix: invalid prefix " . $prefix);
        }
        $this->prefix = rtrim($prefix, "/");
        return $this;
    }
440327
protected function getGroupResourceName($prefix, $resource, $method)
    {
        $group = trim(
            str_replace('/', '.', $this->router->getLastGroupPrefix()), '.'
        );

        if (empty($group)) {
            return trim("{$prefix}{$resource}.{$method}", '.');
        }

        return trim("{$prefix}{$group}.{$resource}.{$method}", '.');
    }
850237
public function setIdPrefix(string $prefix = null)
    {
        foreach ((array)$this as $element) {
            if (is_object($element)) {
                $element->setIdPrefix($prefix);
            }
        }
    }
298811
public static function tmpFile($prefix = null)
    {
        $tmp_path = RUNTIME_PATH . 'file/';
        
        // 不存在则创建
        is_dir($tmp_path) || mkdir($tmp_path, 777, true);
        
        $prefix || $prefix = 'tmp';
        return tempnam($tmp_path, $prefix);
    }
557170
public function getHex($prefix = '')
    {
        return sprintf('%s%02x%02x%02x', $prefix,
            $this->getRedValue(),
            $this->getGreenValue(),
            $this->getBlueValue()
        );
    }
1236148
public function prefixToNamespaceURI($prefix)
    {
        return isset($this->prefix_to_uri[$prefix]) ? $this->prefix_to_uri[$prefix] : false;
    }
1282538
public function getConfig($prefix){
		/* @var $siteConfigService EyeService */
		$siteConfigService = $this->getServiceLocator()->get(EyeService::class);
		$config = $siteConfigService->getAll();
		
		// get config selected by prefix
		$prefixParts = explode('.', $prefix);
		$conf = $config;
		foreach ($prefixParts as $prefix) {
			if(isset($conf[$prefix])){
				$conf = $conf[$prefix];
			} else {
				$conf = array();
			}
		}
		return $conf;
	}
240660
public static function token($prefix = '') : string
    {
        $token = sha1(uniqid($prefix, true) . mt_rand());

        return $token;
    }
531416
public function beginsWith($prefix)
    {
        return $prefix === ''
        || mb_strpos(
            $this->contents,
            (string) $prefix,
            null,
            $this->encoding
        ) === 0;
    }
965074
private function getResourceFromParameter($prefix = '--unique-prefix')
    {
        $resource = null;
        $hasParameter = false;

        $val = $this->getParameterValue($prefix);
        if ($val) {
            $hasParameter = true;
            $resource = $this->getResource($val);
            if (!$resource->exists()) {
                $resource = null;
            }
        }

        return $hasParameter ? $resource : false;
    }
158411
public static function read( $prefix = '' ) 
	{
		if ( !static::is_windows() ) 
		{	
			$line = readline( $prefix ); 
			readline_add_history( $line );
		} 
		else 
		{	
			static::write( $prefix );
			$line = trim( fgets( STDIN ) );
		}
		
		return $line;
	}
620680
public static function lookupNamespace($prefix)
    {
        return isset(self::$_namespaces[$prefix]) ?
            self::$_namespaces[$prefix] :
            $prefix;
    }
840165
public function setCachePrefix($prefix) {
		if (empty($prefix)) {
			$this->prefix = null;
			return;
		}
		
		$prefix = strtolower($prefix);
		
		if (preg_match('/[^0-9a-z_]+/', $prefix)) {
			throw new NoPath('Forbidden symbols used in the prefix');
		}
		
		$this->prefix = $prefix;
	}
1021739
protected function removePrefix($string, $prefix)
    {
        if (substr($string, 0, strlen($prefix)) == $prefix) {
            return substr($string, strlen($prefix));
        } else {
            return $string;
        }
    }