if (!class_exists('wcf\system\WCFACP', false)) {
call_user_func(array($className, 'getInstance'));
}
+
+ // set package dir
+ call_user_func(array($className, 'setPackageDir'), $packageDir);
}
else {
unset(self::$autoloadDirectories[$abbreviation]);
* @category Community Framework
*/
abstract class AbstractApplication extends SingletonFactory implements IApplication {
+ /**
+ * application's package dir
+ * @var string
+ */
+ protected static $packageDir = '';
+
/**
* @see wcf\system\application\IApplication::__callStatic()
*/
public static function __callStatic($method, array $arguments) {
return call_user_func_array(array('wcf\system\WCF', $method), $arguments);
}
+
+ /**
+ * @see wcf\system\application\IApplication::setPackageDir()
+ */
+ public static function setPackageDir($packageDir) {
+ self::$packageDir = $packageDir;
+ }
+
+ /**
+ * @see wcf\system\application\IApplication::setPackageDir()
+ */
+ public function getPackageDir() {
+ return self::$packageDir;
+ }
}
* @return mixed
*/
public static function __callStatic($method, array $arguments);
+
+ /**
+ * Sets application's package dir.
+ *
+ * @param string $packageDir
+ */
+ public static function setPackageDir($packageDir);
+
+ /**
+ * Returns application's package dir.
+ *
+ * @return string
+ */
+ public static function getPackageDir();
}