Exemplo n.º 1
0
 /**
  * @param IConfig   $RendererConfig
  * @param Container $Container
  */
 public function __construct(IConfig $RendererConfig, Container $Container)
 {
     $this->renderer_config = $RendererConfig;
     foreach ((array) $RendererConfig->get('include_path') as $dir => $pend) {
         if ($dir and is_dir($dir)) {
             static::addIncludePath($dir, $pend === 'prepend');
         }
     }
     $this->container = $Container;
 }
Exemplo n.º 2
0
 /**
  * @param IConfig $RoleConfig
  */
 public function __construct(IConfig $RoleConfig)
 {
     $this->role_config = $RoleConfig;
     $this->strip_namespace = $RoleConfig->get('strip_namespace');
     $role_name = $this->normalizeClass($this);
     foreach ((array) $RoleConfig->get('rule', $role_name) as $class => $v) {
         $class = $this->normalizeClass($class);
         foreach ($v as $method => $permission_weight) {
             $this->setPermission($class, $method, $permission_weight);
         }
     }
 }
Exemplo n.º 3
0
 /**
  * @param IConfig              $RendererConfig
  * @param Container            $Container
  * @param Twig_LoaderInterface $Twig_Loader_Filesystem
  */
 public function __construct(IConfig $RendererConfig, Container $Container, Twig_LoaderInterface $Twig_Loader_Filesystem)
 {
     $this->loader = $Twig_Loader_Filesystem;
     $this->twig = new Twig_Environment($this->loader, (array) $RendererConfig->get('twig'));
     parent::__construct($RendererConfig, $Container);
 }