| 123456789101112131415161718192021222324252627282930313233343536373839 |
- <?php
- define('DS', DIRECTORY_SEPARATOR);
- define('APP_PATH_LIB', dirname(__FILE__));
- define('APP_PATH_ROOT', realpath(APP_PATH_LIB . DS . '..'));
- define('APP_PATH_WWW', APP_PATH_ROOT);
- define('APP_PATH_CONFIG', APP_PATH_ROOT . DS . 'config');
- define('APP_PATH_SCHEMA', APP_PATH_ROOT . DS . 'schema');
- // @usage: throw (new AlertSuccessException("Success"))->setBody([ 'id' => 123 ]);
- // ... catch (AlertSuccessException $e) { $e->getBody(); ... }
- class AlertExceptionBase extends Exception {
- public $_body;
- public function setBody($body) { $this->_body = $body; return $this; }
- public function getBody() { return $this->_body; }
- }
- class AlertWarningException extends AlertExceptionBase {}
- class AlertDangerException extends AlertExceptionBase {}
- class AlertSuccessException extends AlertExceptionBase {}
- class AlertInfoException extends AlertExceptionBase {}
- require_once APP_PATH_LIB . '/' . 'Lib.php';
- Lib::loadClass('DBG');
- Lib::loadClass('V');
- Lib::loadClass('Config');
- Lib::loadClass('DB');
- Lib::loadClass('DataSourceException');
- Lib::loadClass('ACL');
- Lib::loadClass('User');
- Lib::loadClass('SE_Layout');
- Lib::loadClass('S');
- Lib::loadClass('Http');
- Lib::loadClass('HttpException');
- Lib::loadClass('StorageException');
- Lib::loadClass('Router');
- Lib::loadClass('Request');
- Lib::loadClass('SchemaException');
- Lib::loadClass('Schema_TableFactory');
|