pakeApp::have_pakefile PHP Method

have_pakefile() public method

If a match is found, it is copied into @pakefile.
public have_pakefile ( )
    public function have_pakefile()
    {
        $is_windows = strtolower(substr(PHP_OS, 0, 3)) == 'win';
        $here = getcwd();
        foreach ($this->PAKEFILES as $file) {
            $path_includes_directory = basename($file) !== $file;
            if ($path_includes_directory) {
                if ($is_windows) {
                    $is_absolute_path = ($file[0] == '\\' or $file[0] == '/' or mb_ereg('^[A-Za-z]+:', $file) === 1);
                } else {
                    $is_absolute_path = $file[0] == '/';
                }
            } else {
                $is_absolute_path = false;
            }
            if ($is_absolute_path) {
                $filepath = $file;
            } else {
                $filepath = $here . DIRECTORY_SEPARATOR . $file;
            }
            if (file_exists($filepath)) {
                $this->pakefile = realpath($filepath);
                return true;
            }
        }
        return false;
    }