environment
:依照不同的需求,可藉由建立不同的 configuration file 設定不同的環境,不須重寫程式碼,切換不同的 configuration file 即可影響程式的運行,不須改寫程式碼
Bundle
logical names:作用:類似 URL ,用以存取指定的資源,而非該資源的實體地址
原文:" they abstract where the resource is actually stored "
Logical Controller Names
format
BUNDLE_NAME:CONTROLLER_NAME:ACTION_NAME
For instance,
AcmeDemoBundle:Welcome:index
maps to
the
indexAction
method from the
Acme\DemoBundle\Controller\WelcomeController
classcreate a bundle -
AcmeNewBundle
- and specify that it overrides AcmeDemoBundle
.
When Symfony loads the AcmeDemoBundle:Welcome:index
controller, it will
first look for the WelcomeController
class in AcmeNewBundle
and, if
it doesn't exist, then look inside AcmeDemoBundle
. This means that one bundle
can override almost any part of another bundle
沒有留言:
張貼留言