__construct() публичный Метод

The $config array can contain the following overrides: name string The name of the view (defaults to the view class name) template_path string The path of the layout directory layout string The layout for displaying the view viewFinder ViewTemplateFinder The object used to locate view templates in the filesystem viewEngineMap array Maps view template extensions to view engine classes
public __construct ( Container $container, array $config = [] ) : View
$container FOF30\Container\Container The container we belong to
$config array The configuration overrides for the view
Результат View
Пример #1
0
 /**
  * Assigns callback functions to the class, the $methods array should be an associative one, where
  * the keys are the method names, while the values are the closure functions, e.g.
  *
  * array(
  *    'foobar' => function(){ return 'Foobar'; }
  * )
  *
  * @param           $container
  * @param array     $config
  * @param array     $methods
  */
 public function __construct(Container $container, array $config = array(), array $methods = array())
 {
     foreach ($methods as $method => $function) {
         $this->methods[$method] = $function;
     }
     parent::__construct($container, $config);
 }
Пример #2
0
Файл: Raw.php Проект: akeeba/fof
 /**
  * Overrides the constructor to apply Joomla! ACL permissions
  *
  * @param   Container  $container  The container we belong to
  * @param   array      $config     The configuration overrides for the view
  */
 public function __construct(Container $container, array $config = array())
 {
     parent::__construct($container, $config);
     $this->permissions = $this->getPermissions(null, $this->additionalPermissions);
 }