correct namespaces
This commit is contained in:
parent
b392eb9188
commit
7348ca080c
3 changed files with 17 additions and 13 deletions
|
@ -116,17 +116,20 @@
|
|||
try {
|
||||
return $this->_run($request, $response);
|
||||
}
|
||||
catch(ParamsNotValidException $e) {
|
||||
$this->error($e, WebUtils::HTTP_NOT_FOUND, self::STAGE_RUN);
|
||||
catch(\nre\exceptions\AccessDeniedException $e) {
|
||||
$this->error($e, \nre\core\WebUtils::HTTP_FORBIDDEN, self::STAGE_RUN);
|
||||
}
|
||||
catch(IdNotFoundException $e) {
|
||||
$this->error($e, WebUtils::HTTP_NOT_FOUND, self::STAGE_RUN);
|
||||
catch(\nre\exceptions\ParamsNotValidException $e) {
|
||||
$this->error($e, \nre\core\WebUtils::HTTP_NOT_FOUND, self::STAGE_RUN);
|
||||
}
|
||||
catch(DatamodelException $e) {
|
||||
$this->error($e, WebUtils::HTTP_SERVICE_UNAVAILABLE, self::STAGE_RUN);
|
||||
catch(\nre\exceptions\IdNotFoundException $e) {
|
||||
$this->error($e, \nre\core\WebUtils::HTTP_NOT_FOUND, self::STAGE_RUN);
|
||||
}
|
||||
catch(ActionNotFoundException $e) {
|
||||
$this->error($e, WebUtils::HTTP_NOT_FOUND, self::STAGE_RUN);
|
||||
catch(\nre\exceptions\DatamodelException $e) {
|
||||
$this->error($e, \nre\core\WebUtils::HTTP_SERVICE_UNAVAILABLE, self::STAGE_RUN);
|
||||
}
|
||||
catch(\nre\exceptions\ActionNotFoundException $e) {
|
||||
$this->error($e, \nre\core\WebUtils::HTTP_NOT_FOUND, self::STAGE_RUN);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -173,8 +176,8 @@
|
|||
func_get_args()
|
||||
);
|
||||
}
|
||||
catch(DatamodelException $e) {
|
||||
throw new FatalDatamodelException($e->getDatamodelMessage(), $e->getDatamodelErrorNumber());
|
||||
catch(\nre\exceptions\DatamodelException $e) {
|
||||
throw new \nre\exceptions\FatalDatamodelException($e->getDatamodelMessage(), $e->getDatamodelErrorNumber());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -60,7 +60,7 @@
|
|||
$this->errorService($e);
|
||||
}
|
||||
catch(\nre\exceptions\ActionNotFoundException $e) {
|
||||
$this->error($e, WebUtils::HTTP_NOT_FOUND);
|
||||
$this->error($e, \nre\core\WebUtils::HTTP_NOT_FOUND);
|
||||
}
|
||||
catch(\nre\exceptions\FatalDatamodelException $e) {
|
||||
$this->errorService($e);
|
||||
|
|
|
@ -74,7 +74,7 @@
|
|||
*/
|
||||
private static function getClassName($modelName)
|
||||
{
|
||||
$className = \nre\core\ClassLoader::concatClassNames($modelName, \nre\core\ClassLoader::stripNamespace(get_class()));
|
||||
$className = ClassLoader::concatClassNames($modelName, ClassLoader::stripNamespace(get_class()));
|
||||
|
||||
|
||||
return \nre\configs\AppConfig::$app['namespace']."models\\$className";
|
||||
|
@ -131,7 +131,8 @@
|
|||
Model::load($model);
|
||||
|
||||
// Construct Model
|
||||
$this->$model = Model::factory($model);
|
||||
$modelName = ucfirst(strtolower($model));
|
||||
$this->$modelName = Model::factory($model);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue