Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- // This is a model
- interface HasBalance {
- public function addToBalance(amount);
- }
- class Customer implements HasBalance {
- public $name;
- public $description;
- ...
- static function getById($id) {
- ...
- }
- public function addToBalance(amount) {
- ...
- }
- }
- class Company implements HasBalance {
- public function addToBalance(amount) {
- ...
- }
- }
- // This is a controller
- class AccountInformation extends HttpController {
- public function execute(HttpRequest $httpRequest) {
- $info = Customer::getById($httpRequest->query->id);
- $view = View::create('account_information.html', $info);
- return new HttpResponse($view);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement