PhpBrew\Utils::getLookupPrefixes PHP Method

getLookupPrefixes() public static method

public static getLookupPrefixes ( )
    public static function getLookupPrefixes()
    {
        $prefixes = array('/usr', '/usr/local', '/usr/local/opt', '/opt', '/opt/local');
        if ($pathStr = getenv('PHPBREW_LOOKUP_PREFIX')) {
            $paths = explode(':', $pathStr);
            foreach ($paths as $path) {
                $prefixes[] = $path;
            }
        }
        // if there is lib path, insert it to the end.
        foreach ($prefixes as $prefix) {
            if ($arch = self::detectArch($prefix)) {
                $prefixes[] = "{$prefix}/{$arch}";
            }
        }
        return array_reverse($prefixes);
    }

Usage Example

Example #1
0
 public function testLookupPrefix()
 {
     ok(Utils::getLookupPrefixes());
 }
All Usage Examples Of PhpBrew\Utils::getLookupPrefixes