Gets a pattern suitable for use with glob to find all keys in the cache.

@param string $prefix A prefix to use.
@return string The pattern.
483997
protected function glob_keys_pattern($prefix = '') {
        if ($this->singledirectory) {
            return $this->path . '/'.$prefix.'*.cache';
        } else {
            return $this->path . '/*/'.$prefix.'*.cache';
        }
    }
1131522
private function getSelectFrom($prefix = 'u')
    {
        $this->joins = '';
        $this->prefixes = [$prefix];

        // select and where fields
        $fieldsWhere = array_merge(
            (null != $this->fields) ? $this->fields : [],
            array_keys($this->where)
        );

        $fieldsWhere = array_merge($fieldsWhere, $this->searchTextFields, $this->searchNumberFields);

        if (null != $fieldsWhere && count($fieldsWhere) >= 0) {
            foreach ($fieldsWhere as $field) {
                $this->performSelectFromField($field, $prefix);
            }
        }
        // if no field is selected take prefix
        if (true === $this->countQuery) {
            $this->select = $this->replaceSelect;
        } elseif (0 == strlen($this->select)) {
            $this->select = $prefix;
        }

        $dql = 'SELECT %s
                FROM %s %s
                  %s';

        return sprintf($dql, $this->select, $this->entityName, $prefix, $this->joins);
    }
896126
public function prefix($prefix)
    {
        $this->uri = trim($prefix, '/') .'/' .trim($this->uri, '/');

        return $this;
    }
736894
public function getTaxonomyWithPrefix( $prefix )
	{
		if ( ! $prefix ) return false;

		foreach ( $this->importedSchemas as $taxonomy )
		{
			if ( $taxonomy->getPrefix() == $prefix )
			{
				return $taxonomy;
			}
		}

		return false;
	}
573426
public function getPrefix($uriToMatch)
    {
        $cacheId = 'getPrefix_'.$uriToMatch;

        if (false == isset($this->cache[$cacheId])) {
            foreach ($this->namespaces as $prefix => $uri) {
                if ($uriToMatch == $uri) {
                    $this->cache[$cacheId] = $prefix;
                    return $prefix;
                }
            }

            $this->cache[$cacheId] = null;
        }

        return $this->cache[$cacheId];
    }
453487
public static function stripPrefix($table, $prefix = null)
    {
        $prefix = $prefix ?: Ioc::getDatabase()->getPrefix();

        $num = strlen($prefix);

        if (substr($table, 0, $num) == $prefix) {
            $table = '#__' . substr($table, $num);
        }

        return $table;
    }
75269
function getNamespaceFromPrefix($prefix){
		if (isset($this->namespaces[$prefix])) {
			return $this->namespaces[$prefix];
		}
		//$this->setError("No namespace registered for prefix '$prefix'");
		return false;
	}
800896
public function prefix( $prefix )
    {
        // Detect the Regexp delimiter
        $patternDelim = $this->pattern[0];

        // Add the Regexp delimiter to the prefix
        $prefix = $patternDelim . $prefix . $patternDelim;
        parent::prefix( $prefix );
    }
747495
public static function get( $path, $prefix = '', $suffix = '' ) {
	
		if ( substr( $path, 0, 1 ) == '/' || substr( $path, 0, 3 ) == "::/" ) {
			return $path.$suffix;
		} 

		if ( strpos( $path, '::' ) === false ) {
			return \APPPATH.$prefix.$path.$suffix;
		}
		
		$name = explode( '::', $path );
		
		// do we have a namepsace
		if ( array_key_exists( $name[0], \CCFinder::$bundles ) ) 
		{
			return \CCFinder::$bundles[$name[0]].$prefix.$name[1].$suffix;
		}
		
		return false;
	}
1127445
public function getNamespaceForPrefix( $prefix )
	{
		// Initialize $this->documentPrefixes
		$this->getDocumentNamespaces();

		if ( ! isset( $this->documentPrefixes[ $prefix ] ) )
		{
			// Look for prefix in imported taxonmies
			$taxonomies = array_filter( $this->context->importedSchemas, function( $xbrl ) use ( $prefix ) { return $xbrl->getPrefix() == $prefix; } );
			return $taxonomies ? key( $taxonomies ): null;
		}
		return $this->documentPrefixes[ $prefix ];
	}
782446
private function prefix($prefix)
    {
        if ($prefix) {
            $prefixLastChar = substr($prefix, -1);

            if ($prefixLastChar != '.' && $prefixLastChar != ':') {
                $prefix .= '.';
            }
        }

        return $prefix;
    }
531416
public function beginsWith($prefix)
    {
        return $prefix === ''
        || mb_strpos(
            $this->contents,
            (string) $prefix,
            null,
            $this->encoding
        ) === 0;
    }
31254
protected function getPropertyBuilder($prefix)
    {
        $build = function ($value, $key, $sub = null) use (&$prefix, &$build) {
            $sub = ($sub ? $sub : $prefix);

            if (!is_numeric($key)) {
                $sub .= static::SEP_MAJOR . $this->fixString($key);
            }

            if (is_array($value)) {
                return array_map(
                    $build,
                    $value,
                    array_keys($value),
                    array_fill(0, count($value), $sub)
                );
            }

            $sep = (
                $prefix === $sub
                ? static::SEP_MINOR
                : str_repeat(static::SEP_MAJOR, static::SEP_MULTI)
            );

            return $sub . $sep . $this->fixString($value);
        };

        return $build;
    }
50141
public static function getAll( $prefix = NULL, $excludePrefix = NULL )
	{
		$prefix	= strtoupper( $prefix );
		$length	= strlen( $prefix );
		if( $length	< 2 )
			throw new InvalidArgumentException( 'Prefix "'.$prefix.'" is to short.' );
		$map	= get_defined_constants();
		if( $prefix ){
			foreach( $map as $key => $value )
			{
				if( $key[0] !== $prefix[0] )
					unset( $map[$key] );
				else if( $key[1] !== $prefix[1] )
					unset( $map[$key] );
				else if( substr( $key, 0, $length ) !== $prefix )
					unset( $map[$key] );
#				remark( $prefix." - ".$key." - ".(int)isset( $map[$key] ) );
			}
		}
		if( $excludePrefix ){
			if( substr( $excludePrefix, 0, $length ) !== $prefix )
				$excludePrefix	= $prefix.$excludePrefix;
			foreach( $map as $key => $value ){
				if( substr( $key, 0, strlen( $excludePrefix ) ) === $excludePrefix )
					unset( $map[$key] );
			}
		}
		return $map;
	}
445819
public function getFullUrl($prefix = TRUE)
    {
        if ($this->_fullUrl === FALSE) $this->fillPath();
		
        if ($prefix) {
			if (
				(!empty($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https') ||
				(!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off') || 
				(!empty($_SERVER['HTTP_HTTPS']) && $_SERVER['HTTP_HTTPS'] !== 'off') || 
				(!empty($_SERVER['SERVER_PORT']) && $_SERVER['SERVER_PORT'] == 443)
			)		
				$schema = 'https:/';
				else $schema = 'http:/';
			return $schema.$this->_fullUrl;
		}
        return $this->_fullUrl;
    }
445237
public function getGMT(string $prefix = self::GMT): string
    {
        list($hour, $minute, $sign) = $this->getUtcParts($this->offset);
        return $prefix.$sign.$hour.$minute;
    }
1100031
public function list_keys($pattern = '')
    {
        try {
            $keys = $this->gpg->getKeys($pattern);
            $result = array();

            foreach ($keys as $idx => $key) {
                $result[] = $this->parse_key($key);
                unset($keys[$idx]);
            }

            return $result;
        }
        catch (Exception $e) {
            return $this->get_error_from_exception($e);
        }
    }