PhpBrew\Utils::findLibPrefix PHP Method

findLibPrefix() public static method

public static findLibPrefix ( )
    public static function findLibPrefix()
    {
        $files = func_get_args();
        $prefixes = self::getLookupPrefixes();
        foreach ($prefixes as $prefix) {
            foreach ($files as $file) {
                $p = $prefix . DIRECTORY_SEPARATOR . $file;
                if (file_exists($p)) {
                    return $prefix;
                }
            }
        }
        return;
    }

Usage Example

Example #1
0
 public function testPrefix()
 {
     $this->assertNotNull(Utils::findLibPrefix('icu/pkgdata.inc', 'icu/Makefile.inc'));
     $this->assertNotNull(Utils::findIncludePrefix('openssl/opensslv.h'));
 }
All Usage Examples Of PhpBrew\Utils::findLibPrefix