Zend Framework: Application.ini, what does resources.view [] = do?

I wonder what adds ...

resources.view[] = 

... init application.inireally?

I know this allows me to access the view from bootstrap using

$this->bootstrap('view');
$view = $this->getResource('view');

but I wonder how zf knows resources.view= zend view? I assume that this is done and access $viewto getResource('view')create a view initialized with the zend view plugin?

If I do not add a line resources.view[] =, is my application still looking like zend on the right? so why do we need this line just to get a view resource?

+3
source share
2 answers

This line starts loading the View resource, see

http://framework.zend.com/manual/en/zend.application.available-resources.html#zend.application.available-resources.view

(doctype, encoding ..) . application.ini.

yes, viewRenderer View , .

+4

:

resources.view[] =

ini php:

array(
    'resources' => array(
         'view' => array()  // pass empty array of the view options
    )
)

Bootstrap , null, , , , NULL, , - .

, :

resources.view.enabled = 1

enabled .

0

Source: https://habr.com/ru/post/1756156/


All Articles