YAF 0 Basic Learning Summary 4-yaf configuration file

Source: Internet
Author: User

In the previous section of the Hello Yaf we have been exposed to the YAF configuration file, Yaf and the user shared a configuration space, that is, in the Yaf_application initialization time given in the configuration file configuration. As a difference, YAF's configuration items start with the AP. YAF's core essential configuration item is only one (in fact, this can also have default parameters, but the author felt completely not configured, looks too shabby).

Yaf a set of configurations to suit a variety of environments (online, test, development) by selecting different configuration sections in different environments, and then combining configurations to inherit.
YAF an essential configuration item, which is the absolute path to the Configuration Application project
Application.directory

The previous section of our configuration for this item is


Application.directory=app_path "/application/"

In the configuration, we can directly use PHP constants that have already been defined, such as the App_path above



YAF Optional Configuration Items

In addition, YAF also has some optional configuration items, said to be optional, in fact, the framework has given these configuration items default values, we can directly use these default values, of course, in order to meet the needs of our project itself, we may need to define their own set of values for these configuration items, The meanings and default values of these configuration items are listed below

Application.ext PHP script extension defaults to PHP

Application.bootsttrap Bootstrap path (absolute path) defaults to bootstrapapplication.php

Application.library the Absolute directory address of the local (own) class library defaults to Application.directory + '/library '
Application.baseuri the path prefix that needs to be ignored in the route, generally does not need to set, YAF will automatically judge
Application.dispatcher.defaultModule Default module default value is index
Application.dispatcher.defaultController the default controller, the default value is index
Application.dispatcher.defaultAction The default action, the default value is index
Application.view.ext View template file extension defaults to phtml (note the previous section our template filename is index.phtml OH)
Application.dispatcher.throwException whether to run out of exception when it is wrong default is True
Application.dispatcher.catchException whether to use the default exception capture controller, if open, if there is an uncaught exception, Control is given to the Errorcontroller ErrorAction method, which means that the program will go to the error controller ErrorAction, you can get the exception object thrown by $request->getexception () The default value is False
Application.modules declare the module name in the pure, note that if you want to define this value, be sure to define the index module
Application.system.* This property, you can modify the YAF runtime configure, such as Application.system.lowcase_path, but be aware that only php_in_ All of the configuration items can be modified here

This is the configuration of the Yaf a simple understanding, follow-up we will specifically explain the YAF configuration file format, definition, read the way

Reference Source:
YAF 0 Basic Learning Summary 4-yaf configuration file
Http://www.lai18.com/content/407137.html

YAF 0 Basic Learning Summary 4-yaf configuration file

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.