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
| <?php | |
| class AdrOrNotFramework | |
| { | |
| // | |
| // ... does lots of routing and what not, | |
| // your typical micro-framework nonsense... | |
| // | |
| public function redirectTo($url) | |
| { | |
| return new RedirectResponse($url); | |
| } | |
| } | |
| class MyApp extends AdrOrNotFramework | |
| { | |
| public function routes() | |
| { | |
| $this->post('/whatever', function () { | |
| // | |
| // This is an Action... | |
| // | |
| // Is this ADR compatible? | |
| return $this->redirecctTo('http://google.com'); | |
| }); | |
| } | |
| } |
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
| <?php | |
| class AdrOrNotFramework | |
| { | |
| } | |
| class UtilityResponder | |
| { | |
| public static function redirectTo($url) | |
| { | |
| return new RedirectResponse($url); | |
| } | |
| } | |
| class MyApp extends AdrOrNotFramework | |
| { | |
| public function routes() | |
| { | |
| $this->post('/whatever', function () { | |
| // | |
| // This is an Action... | |
| // | |
| // Is this ADR compatible? | |
| return UtilityResponder::redirecctTo('http://google.com'); | |
| }); | |
| } | |
| } |
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
| <?php | |
| class AdrOrNotFramework | |
| { | |
| public function __construct() | |
| { | |
| $this->utilityResponder = new UtilityResponder(); | |
| } | |
| } | |
| class UtilityResponder | |
| { | |
| public function redirectTo($url) | |
| { | |
| return new RedirectResponse($url); | |
| } | |
| } | |
| class MyApp extends AdrOrNotFramework | |
| { | |
| public function routes() | |
| { | |
| $this->post('/whatever', function () { | |
| // | |
| // This is an Action... | |
| // | |
| // Is this ADR compatible? | |
| return $this->utilityResponder->redirecctTo('http://google.com'); | |
| }); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment