[英]What is the rule(s) to create controllers inside a src/ folder in Zend framework 2?
[英]Extra folder in controllers in Zend Framework
我想在控制器中添加一個新目錄。 我不想創建模塊或其他東西。 我的結構是這樣的:
application
controllers
connections
models
...
我希望能夠將任何控制器添加到連接,以便我可以使用它。
哦,連接內部的控制器只能用於
// forward to an action in another controller:
// FooController::bazAction(),
// in the current module:
$this->_forward('baz', 'foo', null, array('baz' => 'bogus'));
我的問題是我需要添加到bootstrap(或其他任何地方)以便能夠使用這些控制器?
我一直收到錯誤消息:無效的控制器
考慮以下結構:
application
controllers
Connection (with a capitalized C and no S)
models
...
您可以使用以下方式轉發給控制器:
// forward to an action in another controller:
// Connection_FooController::bazAction(),
// in the current module:
$this->_forward('baz', 'connection_foo', null, array('baz' => 'bogus'));
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.