From: Andrey Kutejko Date: Wed, 7 Jan 2015 18:43:12 +0000 (+0200) Subject: change configuration call X-Git-Tag: 0.6~84 X-Git-Url: https://git.andy128k.dev/?a=commitdiff_plain;h=99578bf83cc555451baa707416c92abc666b1578;p=ipf.git change configuration call --- diff --git a/index.php b/index.php index 489748a..9753a24 100644 --- a/index.php +++ b/index.php @@ -6,9 +6,8 @@ if (php_sapi_name() === 'cli-server' && is_file($_SERVER['DOCUMENT_ROOT'] . urld return false; $here = dirname(__FILE__); -$project_path = $here . '/../project'; -$vendor_path = $here . '/../vendor'; -require_once $vendor_path.'/autoload.php'; -IPF::setUp($project_path, $here); +$project_root = $here . '/..'; +require_once $project_root . '/vendor/autoload.php'; +IPF::configure($project_root, $here); IPF_Project::getInstance()->run(); diff --git a/ipf.php b/ipf.php index 4f7153b..a7dc548 100644 --- a/ipf.php +++ b/ipf.php @@ -31,10 +31,8 @@ final class IPF die('Specify site url routes'); } - public static function setUp($project_path, $document_root) + public static function configure($project_root, $document_root) { - $project_root = dirname($project_path); - self::$settings = IPF_Settings::create() ->apply(array( 'app_base' => '',