PhpBrew\Utils::findIncludePrefix PHP Méthode

findIncludePrefix() public static méthode

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

Usage Example

Exemple #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::findIncludePrefix