Moved AbstractController to Bootstrap
This commit is contained in:
parent
b6f6f22951
commit
041b8eedbe
8 changed files with 12 additions and 23 deletions
|
@ -47,6 +47,12 @@ class Bootstrap
|
|||
{
|
||||
$workCallback();
|
||||
}
|
||||
catch (SimpleException $e)
|
||||
{
|
||||
$this->context->transport->errorMessage = rtrim($e->getMessage(), '.') . '.';
|
||||
$this->context->transport->exception = $e;
|
||||
$this->context->transport->success = false;
|
||||
}
|
||||
catch (Exception $e)
|
||||
{
|
||||
$this->context->exception = $e;
|
||||
|
|
|
@ -1,17 +0,0 @@
|
|||
<?php
|
||||
abstract class AbstractController
|
||||
{
|
||||
public function workWrapper($workCallback)
|
||||
{
|
||||
try
|
||||
{
|
||||
$workCallback();
|
||||
}
|
||||
catch (SimpleException $e)
|
||||
{
|
||||
$this->context->transport->errorMessage = rtrim($e->getMessage(), '.') . '.';
|
||||
$this->context->transport->exception = $e;
|
||||
$this->context->transport->success = false;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,5 +1,5 @@
|
|||
<?php
|
||||
class AuthController extends AbstractController
|
||||
class AuthController
|
||||
{
|
||||
private static function hashPassword($pass, $salt2)
|
||||
{
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?php
|
||||
class CommentController extends AbstractController
|
||||
class CommentController
|
||||
{
|
||||
/**
|
||||
* @route /comments
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?php
|
||||
class IndexController extends AbstractController
|
||||
class IndexController
|
||||
{
|
||||
/**
|
||||
* @route /
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?php
|
||||
class PostController extends AbstractController
|
||||
class PostController
|
||||
{
|
||||
/**
|
||||
* @route /posts
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?php
|
||||
class TagController extends AbstractController
|
||||
class TagController
|
||||
{
|
||||
/**
|
||||
* @route /tags
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?php
|
||||
class UserController extends AbstractController
|
||||
class UserController
|
||||
{
|
||||
/**
|
||||
* @route /users
|
||||
|
|
Loading…
Reference in a new issue