From 99578bf83cc555451baa707416c92abc666b1578 Mon Sep 17 00:00:00 2001 From: Andrey Kutejko Date: Wed, 7 Jan 2015 20:43:12 +0200 Subject: [PATCH] change configuration call --- index.php | 7 +++---- ipf.php | 4 +--- 2 files changed, 4 insertions(+), 7 deletions(-) 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' => '', -- 2.49.0