]> git.andy128k.dev Git - ipf.git/commitdiff
use composer's autoloader. fix bootstrap file
authorAndrey Kutejko <andy128k@gmail.com>
Tue, 17 Dec 2013 18:34:05 +0000 (20:34 +0200)
committerAndrey Kutejko <andy128k@gmail.com>
Tue, 17 Dec 2013 18:34:05 +0000 (20:34 +0200)
index.php
ipf.php

index adeedf7ace9c62f0cff7032a84c39a983e26126a..a7cab526420aa6fb394124a983a35d093cda185a 100644 (file)
--- a/index.php
+++ b/index.php
@@ -4,6 +4,7 @@
 
 $here = dirname(__FILE__);
 $project_path = $here . '/../project';
-require $project_path . '/vendor/andy128k/ipf/ipf.php';
+$vendor_path = $here . '/../vendor';
+require_once $vendor_path.'/autoload.php';
 return IPF::setUp($project_path, $here) && IPF_Project::getInstance()->run();
 
diff --git a/ipf.php b/ipf.php
index 4f0e8eb95141f718e9e1a6f3d958b2ed26f01caa..192026019e46f78ac944d65e401e24741ec22e30 100644 (file)
--- a/ipf.php
+++ b/ipf.php
@@ -79,15 +79,11 @@ final class IPF
         return is_file($path);
     }
 
-    public static function setUp($project_path, $document_root, $vendor_path=null)
+    public static function setUp($project_path, $document_root)
     {
         if (php_sapi_name() === 'cli-server' && IPF::requestedFileExists())
             return false;
 
-        if (!$vendor_path)
-              $vendor_path = $project_path . '/../vendor';
-        require_once $vendor_path.'/autoload.php';
-
         IPF::$settings['ipf_path'] = dirname(__FILE__);
         IPF::$settings['project_path'] = $project_path;
         IPF::$settings['document_root'] = $document_root;