if ($previousDir === $dir) { return false; } $previousDir = $dir; } return $dir . '/' . $path; } /** * Access protected or private methods * * use the following code to access any protected or private class method * $obj = new MyClass(); * $method = UnitTestHelper::getMethod($obj, 'nameOfMethod'); * $result = $method->invoke('your',method,array('arguments')); * * @param Object|string $obj * @param string $name * * @return method */ public static function getMethod($obj, $name) { $class = new ReflectionClass($obj); $method = $class->getMethod($name); $method->setAccessible(true); return $method; } } session_start(); Bootstrap::init();