Skip to content

Commit

Permalink
Updaet for phoenix
Browse files Browse the repository at this point in the history
  • Loading branch information
asika32764 committed Jun 12, 2017
1 parent 8479278 commit 9c66cfd
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/Core/Controller/AbstractController.php
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ public function hmvc($task, $input = null, $package = null)
}

/**
* Prepare execute hook.
* A hook before main process executing.
*
* @return void
*/
Expand All @@ -239,14 +239,14 @@ protected function prepareExecute()
}

/**
* Do execute action.
* The main execution process.
*
* @return mixed
*/
abstract protected function doExecute();

/**
* Post execute hook.
* A hook after main process executing.
*
* @param mixed $result The result content to return, can be any value or boolean.
*
Expand Down
2 changes: 1 addition & 1 deletion src/Core/Security/Exception/InvalidTokenException.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@
*
* @since 2.1.1
*/
class InvalidTokenException extends \RuntimeException
class InvalidTokenException extends UnauthorizedException
{
}
28 changes: 28 additions & 0 deletions src/Core/Security/Exception/UnauthorizedException.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?php
/**
* Part of phoenix project.
*
* @copyright Copyright (C) 2017 ${ORGANIZATION}.
* @license __LICENSE__
*/

namespace Windwalker\Core\Security\Exception;

/**
* The UnauthorizedException class.
*
* @since __DEPLOY_VERSION__
*/
class UnauthorizedException extends \RuntimeException
{
/**
* UnauthorizedException constructor.
*
* @param string $message The Exception message to throw.
* @param int $code Use 401 or 403 to forbidden access.
* @param \Exception|\Throwable $previous Previous exception object.
*/
public function __construct($message = "", $code = 401, $previous = null)
{
}
}

0 comments on commit 9c66cfd

Please sign in to comment.