public function findConfigurationFile($filename = null, $pwd = null)
    {
        $filename = $filename ?: $this->getConfigurationFileName();
        $pwd = $pwd ?: getcwd();
        
        $dirs = explode(DS, $pwd);
        $find = false;
        do {
            $dir = join(DS, $dirs);
            $config_file_path = $dir . DS . $filename;
            if (file_exists($config_file_path) && is_file($config_file_path))
                return $config_file_path;
        } while (array_pop($dirs));

        return $pwd . DS . $filename;
    }