Skip to content

Instantly share code, notes, and snippets.

@aasumitro
Created February 5, 2018 09:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aasumitro/ec2942be40c02c9644a18fcccdbad2a1 to your computer and use it in GitHub Desktop.
Save aasumitro/ec2942be40c02c9644a18fcccdbad2a1 to your computer and use it in GitHub Desktop.
app controllers Controller.php slim 3
<?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