diff options
author | xue <> | 2005-12-29 11:52:31 +0000 |
---|---|---|
committer | xue <> | 2005-12-29 11:52:31 +0000 |
commit | 658a7e1c4cf5a53dcd61ee196658090d00f2d64a (patch) | |
tree | c37b767c6e4d70baaf9ff471ce3721c9d8733f72 /demos/quickstart/protected/pages/Configurations | |
parent | c0006cf0da8c3499060df7378cc376c98cbce7c4 (diff) |
Used THighlighter to show code fragments.
Diffstat (limited to 'demos/quickstart/protected/pages/Configurations')
-rw-r--r-- | demos/quickstart/protected/pages/Configurations/AppConfig.page | 40 | ||||
-rw-r--r-- | demos/quickstart/protected/pages/Configurations/PageConfig.page | 42 |
2 files changed, 41 insertions, 41 deletions
diff --git a/demos/quickstart/protected/pages/Configurations/AppConfig.page b/demos/quickstart/protected/pages/Configurations/AppConfig.page index 101e449c..127f74a4 100644 --- a/demos/quickstart/protected/pages/Configurations/AppConfig.page +++ b/demos/quickstart/protected/pages/Configurations/AppConfig.page @@ -6,32 +6,32 @@ Application configurations are used to specify the global behavior of an applica </p>
<p>
Configuration for an application is stored in an XML file named <tt>application.xml</tt>, which should be located under the application base path. Its format is shown in the following,
-<pre class="source">
-<application PropertyName="PropertyValue" ...>
- <paths>
- <alias id="AliasID" path="AliasPath" />
- <using namespace="Namespace" />
- </paths>
- <modules>
- <module id="ModuleID" class="ModuleClass" PropertyName="PropertyValue" ... />
- </modules>
- <services>
- <service id="ServiceID" class="ServiceClass" PropertyName="PropertyValue" ... />
- </services>
- <parameters>
- <parameter id="ParameterID" class="ParameterClass" PropertyName="PropertyValue" ... />
- </parameters>
-</application>
-</pre>
+<com:TTextHighlighter Language="xml" CssClass="source">
+<application PropertyName="PropertyValue" ...>
+ <paths>
+ <alias id="AliasID" path="AliasPath" />
+ <using namespace="Namespace" />
+ </paths>
+ <modules>
+ <module id="ModuleID" class="ModuleClass" PropertyName="PropertyValue" ... />
+ </modules>
+ <services>
+ <service id="ServiceID" class="ServiceClass" PropertyName="PropertyValue" ... />
+ </services>
+ <parameters>
+ <parameter id="ParameterID" class="ParameterClass" PropertyName="PropertyValue" ... />
+ </parameters>
+</application>
+</com:TTextHighlighter>
<ul>
<li>The outermost element <tt><application></tt> corresponds to the <tt>TApplication</tt> instance. The <tt>PropertyName="PropertyValue"</tt> pairs specify the initial values for the properties of <tt>TApplication</tt>.</li>
<li>The <tt><paths></tt> element contains the definition of path aliases and the PHP inclusion paths for the application. Each path alias is specified via an <tt><alias></tt> whose <tt>path</tt> attribute takes an absolute path or a path relative to the directory containing the application configuration file. The <tt><using></tt> element specifies a particular path (in terms of namespace) to be appended to the PHP include paths when the application runs. PRADO defines two default aliases: <tt>System</tt> and <tt>Application</tt>. The former refers to the PRADO framework root directory, and the latter refers to the directory containing the application configuration file.</li>
<li>The <tt><modules></tt> element contains the configurations for a list of modules. Each module is specified by a <tt><module></tt> element. Each module is uniquely identified by the <tt>id</tt> attribute and is of type <tt>class</tt>. The <tt>PropertyName="PropertyValue"</tt> pairs specify the initial values for the properties of the module.</li>
<li>The <tt><services></tt> element is similar to the <tt><modules></tt> element. It mainly specifies the services provided by the application.</li>
<li>The <tt><parameters></tt> element contains a list of application-level parameters that are accessible from anywhere in the application. You may specify component-typed parameters like specifying modules, or you may specify string-typed parameters which take a simpler format as follows,
-<pre class="source">
-<parameter id="ParameterID">ParameterValue</parameter>
-</pre>
+<com:TTextHighlighter Language="xml" CssClass="source">
+<parameter id="ParameterID">ParameterValue</parameter>
+</com:TTextHighlighter>
</li>
</ul>
By default without explicit configuration, a PRADO application when running will load a few core modules, such as <tt>THttpRequest</tt>, <tt>THttpResponse</tt>, etc. It will also provide the <tt>TPageService</tt> as a default service. Configuration and usage of these modules and services are covered in individual sections of this tutorial. Note, if your application takes default settings for these modules and service, you do not need to provide an application configuration. However, if these modules or services are not sufficient, or you want to change their behavior by configuring their property values, you will need an application configuration.
diff --git a/demos/quickstart/protected/pages/Configurations/PageConfig.page b/demos/quickstart/protected/pages/Configurations/PageConfig.page index a7d0ef8e..2aff1fb9 100644 --- a/demos/quickstart/protected/pages/Configurations/PageConfig.page +++ b/demos/quickstart/protected/pages/Configurations/PageConfig.page @@ -9,27 +9,27 @@ When a user requests a page stored under <tt><BasePath>/dir1/dir2</tt>, th </p>
<p>
The format of a page configuration file is as follows,
-<pre class="source">
-<configuration>
- <paths>
- <alias id="AliasID" path="AliasPath" />
- <using namespace="Namespace" />
- </paths>
- <modules>
- <module id="ModuleID" class="ModuleClass" PropertyName="PropertyValue" ... />
- </modules>
- <authorization>
- <allow pages="PageID1,PageID2" users="User1,User2" roles="Role1,Role2" verb="get" />
- <deny pages="PageID1,PageID2" users="User1,User2" roles="Role1,Role2" verb="post" />
- </authorization>
- <pages PropertyName="PropertyValue" ...>
- <page id="PageID" PropertyName="PropertyValue" ... />
- </pages>
- <parameters>
- <parameter id="ParameterID" class="ParameterClass" PropertyName="PropertyValue" ... />
- </parameters>
-</configuration>
-</pre>
+<com:TTextHighlighter Language="xml" CssClass="source">
+<configuration>
+ <paths>
+ <alias id="AliasID" path="AliasPath" />
+ <using namespace="Namespace" />
+ </paths>
+ <modules>
+ <module id="ModuleID" class="ModuleClass" PropertyName="PropertyValue" ... />
+ </modules>
+ <authorization>
+ <allow pages="PageID1,PageID2" users="User1,User2" roles="Role1,Role2" verb="get" />
+ <deny pages="PageID1,PageID2" users="User1,User2" roles="Role1,Role2" verb="post" />
+ </authorization>
+ <pages PropertyName="PropertyValue" ...>
+ <page id="PageID" PropertyName="PropertyValue" ... />
+ </pages>
+ <parameters>
+ <parameter id="ParameterID" class="ParameterClass" PropertyName="PropertyValue" ... />
+ </parameters>
+</configuration>
+</com:TTextHighlighter>
The <tt><paths></tt>, <tt><modules></tt> and <tt><parameters></tt> are similar to those in an application configuration. The <tt><authorization></tt> specifies the authorization rules that apply to the current page directory and all its subdirectories. It will be explained in more detail in future sections. The <tt><pages></tt> element specifies the initial values for the properties of pages. Each <tt><page></tt> element specifies the initial property values for a particular page identified by the <tt>id</code attribute. Initial property values given in the <tt><pages></tt> element apply to all pages in the current directory and all its subdirectories.
</p>
|