热门面试题与答案和在线测试
面向面试准备、在线测试、教程与实战练习的学习平台

通过聚焦学习路径、模拟测试和面试实战内容持续提升技能。

WithoutBook 将分主题面试题、在线练习测试、教程和对比指南整合到一个响应式学习空间中。

面试准备

模拟考试

设为首页

收藏此页面

订阅邮箱地址

Zend Framework 面试题与答案

问题 11. Zend_Cache provides a generic way to cache any data.

Caching in Zend Framework is operated by frontends while cache records are stored through backend adapters (File, Sqlite,Memcache...) through a flexible system of IDs and tags. Using those, it is easy to delete specific types of records afterwards (for example: "delete all cache records marked with a given tag").
The core of the module (Zend_Cache_Core) is generic, flexible and configurable. Yet, for your specific needs there are cache frontends that extend Zend_Cache_Core for convenience: Output, File, Function and Class.

这有帮助吗? 添加评论 查看评论
 

问题 12. Difference between Zend_Registry and Zend_Session?

The basic difference between these objects is the scope in which they are valid:

a) Zend_Registry : request scope
b) Zend_Session : session scope

a) Zend_Registry is used to store objects/values for the current request. In short, anything that you commit to Registry in index.php can be accessed from other controllers/actions (because EVERY request is first routed to the index.php bootstrapper via the .htaccess file). Config parameters and db parameters are generally prepped for global use using the Zend_Registry object.

b) Zend_Session actually uses PHP sessions. Data stored using Zend_Session can be accessed in different/all pages. So, if you want to create a variable named UserRole in the /auth/login script and want it to be accessible in /auth/redirect, you would use Zend_Session.

这有帮助吗? 添加评论 查看评论
 

问题 13. When do we need to disable layout?

At the time of calling AJAX to fetch we need to disable layout.
$this->_helper->layout()->disableLayout();
$this->_helper->viewRenderer->setNoRender(true);

这有帮助吗? 添加评论 查看评论
 

问题 14. Where is the model in ZFs MVC implementation?

The model component can vary dramatically in responsibilities and data store from one MVC application to the next.

这有帮助吗? 添加评论 查看评论
 

问题 15. How to call two different views from same action?

Example1:
Public function indexAction() {
If(condition)
$this->render(yourview.phtml);
Else
Index.phtml;

Example2:
Public function indexAction() {
}
Now in your index.phtml you can have this statement to call other view
$this->action(action name,controller name,module name,array(parameter name=>parameter value));

这有帮助吗? 添加评论 查看评论
 

用户评价最有帮助的内容:

版权所有 © 2026,WithoutBook。