����Ҫ����һ��config�����ini�����ļ����μ� Yaf_Config_Ini�� �� Yaf_Application::__construct().
Yaf�������ļ�����û��������ļ��ϲ����������ڣ�Yaf�������ļ�����"yaf."��"application."��ͷ�����������ڣ���"application."��Ч��
Example #1 config���������
<?php
$configs = array(
"application" => array(
"directory" => dirname(__FILE__),
"dispatcher" => array(
"catchException" => 0,
),
"view" => array(
"ext" => "phtml",
),
),
);
$app = new Yaf_Application($config);
?>
Example #2 configΪini�ļ�������
[yaf] yaf.directory = APPLICATION_PATH "/appliation" yaf.dispatcher.catchException = 0 [product : yaf] ; user configuration list here
���� | Ĭ�� | ������־ |
---|---|---|
application.directory | ||
application.ext | "php" | |
application.view.ext | "phtml" | |
application.modules | "index" | |
application.library | application.directory . "/library" | |
application.library.directory | application.directory . "/library" | |
application.library.namespace | "" | |
application.bootstrap | application.directory . "/Bootstrap" . application.ext | |
application.baseUri | "" | |
application.dispatcher.defaultRoute | ||
application.dispatcher.throwException | 1 | |
application.dispatcher.catchException | 0 | |
application.dispatcher.defaultModule | "index" | |
application.dispatcher.defaultController | "index" | |
application.dispatcher.defaultAction | "index" | |
application.system |
��������ָ��ļ��˵����
application.directory
string
Ӧ�ó����Ŀ¼������"controllers", "views", "models", "plugins"����Ŀ¼��
Note:
����Ψһһ��û��Ĭ��ֵ�����������Ҫ�ֶ�ָ������
application.ext
string
PHP�ű�����չ��������Զ�������Ҫ�õ���( Yaf_Loader)��
application.view.ext
string
��ͼģ����չ����
application.modules
string
ע���ģ���б��Զ��ŷָ�������·�ɴ����ر��ǵ�PATH_INFO�������ε�ʱ��
Yaf��Ҫ�������жϵ�һ���Ƿ���һ��ģ�顣
application.library
string
��������Ŀ¼���μ�Yaf_Loader �� yaf.library��
Note:
Yaf2.1.6�Ժ�������Ҳ������һ�����飬�����������ʱ������·��������ʹ��application.library.directory��ֵ��
application.library.directory
string
Alias of application.library. Introduced in Yaf 2.1.6
application.library.namespace
string
���ŷָ��ı�����������ռ�ǰ��
Yaf2.1.6�Ժ����
application.bootstrap
string
Bootstrap��ű��ļ��ľ���·����
application.baseUri
string
·�ɴ�������Ҫ���Ե�·��ǰ���ٸ����ӣ�����"/prefix/controller/action"ʱ������㽫application.baseUri����Ϊ"/prefix"����ôֻ��"/controller/action"�ᱻ����·��·����
ͨ������Ҫ���ô�ֵ��
application.dispatcher.throwException
bool
�������Yaf���ڷ�������ĵط��׳��쳣���μ� Yaf_Dispatcher::throwException()��
application.dispatcher.catchException
bool
������������δ������쳣��Yaf�����������Error controller, Error Action���μ� Yaf_Dispatcher::catchException()��
application.dispatcher.defaultRoute
string
Ĭ��·�ɣ����δָ������̬·�ɻᱻ������Ĭ��·�ɣ��μ��� Yaf_Router::addRoute()��
application.dispatcher.defaultModule
string
Ĭ��ģ�������μ� Yaf_Dispatcher::setDefaultModule()��
application.dispatcher.defaultController
string
Ĭ�Ͽ����������μ� Yaf_Dispatcher::setDefaultController()��
application.dispatcher.defaultAction
string
Ĭ�϶��������μ� Yaf_Dispatcher::setDefaultAction()��
application.system
string
��application.ini������Yaf����ʱ���ã��磺 application.system.lowcase_path
Note:
����PHP_INI_ALL����������������