Elgg  Version 3.0
PublicContainer.php
Go to the documentation of this file.
1 <?php
2 
3 namespace Elgg\Di;
4 
5 use DI\Container;
7 use Elgg\Config;
12 use Elgg\Logger;
20 use ElggSession;
22 
45 class PublicContainer extends Container {
46 
50  public function __get($name) {
51  return $this->get($name);
52  }
53 
57  public function __call($name, $arguments) {
58  $proxies = [
59  'echo' => ['translator', 'translate'],
60  ];
61 
62  if (!empty($proxies[$name])) {
63  $svc = $proxies[$name][0];
64  $method = $proxies[$name][1];
65 
66  return call_user_func_array([$this->$svc, $method], $arguments);
67  }
68  }
69 }
if(!$user||!$user->canDelete()) $name
Definition: delete.php:22
__call($name, $arguments)
{}