Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'feature/4.0.0dev0' into develop
- Loading branch information
Showing
313 changed files
with
13,172 additions
and
1,864 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<?php | ||
|
||
namespace Sloths\Application; | ||
|
||
class Console | ||
{ | ||
protected $application; | ||
|
||
public function __construct(Application $application) | ||
{ | ||
$this->application = $application; | ||
} | ||
|
||
public function run() | ||
{ | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<?php | ||
|
||
namespace Sloths\Application\Exception; | ||
|
||
class Stop extends \Exception | ||
{ | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<?php | ||
|
||
namespace Sloths\Application\Service; | ||
|
||
class Redirect implements ServiceInterface | ||
{ | ||
use ServiceTrait; | ||
|
||
/** | ||
* @param string $url | ||
* @param int $code | ||
* @return \Sloths\Http\Response | ||
*/ | ||
public function to($url, $code = 302) | ||
{ | ||
$response = $this->application->response; | ||
$response | ||
->setStatusCode($code) | ||
->getHeaders()->set('Location', $url); | ||
|
||
return $response; | ||
} | ||
|
||
/** | ||
* @return \Sloths\Http\Response | ||
*/ | ||
public function back() | ||
{ | ||
return $this->to($this->application->request->getReferrer()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.