Exemple #1
0
            $this->scanStatus = true;
        }
        foreach (array_merge($this->frameworkDirectory, $this->applicationDirectory) as $directory) {
            $path = $directory . "/" . $class . ".php";
            if (file_exists($path)) {
                require $path;
            }
        }
    }
    /**
     * Make array of framework directory
     */
    private function scanFrameworkDirectory()
    {
        $this->scan($this->dir, 'frameworkDirectory');
    }
    private function scan($_directory, $variable)
    {
        foreach (scandir($_directory) as $directory) {
            $directory != "." && $directory != ".." && is_dir($_directory . "/" . $directory) ? array_push($this->{$variable}, realpath($_directory . '/' . $directory)) : "";
        }
    }
    private function scanApplicationDirectory()
    {
        $this->scan((!empty($this->runtimePath) ? $this->runtimePath : dirname($this->dir)) . '/' . 'app', 'applicationDirectory');
    }
}
$DfTestDir = class_exists('DfTests') ? DfTests::$dataDir : '';
$DfBase = new DfBase($DfTestDir);
DfApp::init(realpath(dirname(__FILE__)));