Created
February 5, 2018 09:00
-
-
Save aasumitro/ec2942be40c02c9644a18fcccdbad2a1 to your computer and use it in GitHub Desktop.
app controllers Controller.php slim 3
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 | |
namespace App\Controllers; | |
class Controller { | |
protected $container; | |
public function __construct($container) { | |
$this->container = $container; | |
} | |
public function __get($property) { | |
if ($this->container{$property}) { | |
return $this->container->{$property}; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment