Commits

Arie W. Subagja  committed 9429016

KO3-ZendFramework Integration

  • Participants

Comments (0)

Files changed (1)

+<?php defined('SYSPATH') or die('No direct script access.');
+
+/**
+ * @author  arie
+ */
+
+## ZEND FRAMEWORK
+$zf_found = false;
+
+// include_path?
+foreach (explode(PATH_SEPARATOR, get_include_path()) as $path)
+{
+    if ( file_exists("{$path}/Zend/Loader/Autoloader.php") )
+    {
+        $zf_found = true;
+        break;
+    }
+}
+
+// add manually
+if (! $zf_found)
+{
+    if ($path = Kohana::find_file('vendor', 'Zend/Loader'))
+    {
+        set_include_path(get_include_path() . PATH_SEPARATOR . dirname(dirname($path)));
+    }
+}
+
+require_once 'Zend/Loader/Autoloader.php';
+Zend_Loader_Autoloader::getInstance();