lib/Bob/ConfigFile.php
static function findConfigFile($filename, $cwd)
    {
        if (!is_dir($cwd)) {
            throw new \InvalidArgumentException(sprintf(
                '%s is not a directory', $cwd
            ));
        }

        # Look for the definition name in the $cwd
        # until one is found.
        while (!$rp = realpath("$cwd/$filename")) {
            # Go up the hierarchy
            $cwd .= '/..';

            # We are at the filesystem boundary if there's
            # nothing to go up to.
            if (realpath($cwd) === false) {
                break;
            }
        }

        return $rp;
    }
static function findConfigFile($filename, $cwd)
    {
        if (!is_dir($cwd)) {
            throw new \InvalidArgumentException(sprintf(
                '%s is not a directory', $cwd
            ));
        }

        # Look for the definition name in the $cwd
        # until one is found.
        while (!$rp = realpath("$cwd/$filename")) {
            # Go up the hierarchy
            $cwd .= '/..';

            # We are at the filesystem boundary if there's
            # nothing to go up to.
            if (realpath($cwd) === false) {
                break;
            }
        }

        return $rp;
    }
static function findConfigFile ( $ filename , $ cwd ) { if ( ! is_dir ( $ cwd ) ) { throw new \ InvalidArgumentException ( sprintf ( '%s is not a directory' , $ cwd ) ) ; } # Look for the definition name in the $cwd # until one is found. while ( ! $ rp = realpath ( "$cwd/$filename" ) ) { # Go up the hierarchy $ cwd .= '/..' ; # We are at the filesystem boundary if there's # nothing to go up to. if ( realpath ( $ cwd ) === false ) { break ; } } return $ rp ; }
# False if the file was not found.
# False if the file was not found .