PhpBrew\Config::getCurrentPhpDir PHP Method

getCurrentPhpDir() public static method

public static getCurrentPhpDir ( $home = false )
    public static function getCurrentPhpDir($home = false)
    {
        if ($home) {
            return self::getHome() . DIRECTORY_SEPARATOR . 'php' . DIRECTORY_SEPARATOR . self::getCurrentPhpName();
        }
        return self::getRoot() . DIRECTORY_SEPARATOR . 'php' . DIRECTORY_SEPARATOR . self::getCurrentPhpName();
    }

Usage Example

Example #1
0
 public function arguments($args)
 {
     $args->add('extensions')->suggestions(function () {
         return array_map(function ($path) {
             return basename(basename($path, '.disabled'), '.ini');
         }, glob(Config::getCurrentPhpDir() . '/var/db/*.{ini,disabled}', GLOB_BRACE));
     });
 }
All Usage Examples Of PhpBrew\Config::getCurrentPhpDir