summaryrefslogtreecommitdiff
path: root/demos/quickstart/protected/pages/Configurations/AppConfig.page
diff options
context:
space:
mode:
Diffstat (limited to 'demos/quickstart/protected/pages/Configurations/AppConfig.page')
-rw-r--r--demos/quickstart/protected/pages/Configurations/AppConfig.page40
1 files changed, 40 insertions, 0 deletions
diff --git a/demos/quickstart/protected/pages/Configurations/AppConfig.page b/demos/quickstart/protected/pages/Configurations/AppConfig.page
new file mode 100644
index 00000000..b6bf89f5
--- /dev/null
+++ b/demos/quickstart/protected/pages/Configurations/AppConfig.page
@@ -0,0 +1,40 @@
+<com:TContent ID="body" >
+
+<h1>Application Configurations</h1>
+<p>
+Application configurations are used to specify the global behavior of an application. This consists of specifying the paths, modules, services and parameters that will be used in an application.
+</p>
+<p>
+Application configurations are stored in an XML file which is passed as a parameter to the <code>TApplication</code> instance. The format of application configurations is shown in the following,
+<pre class="source">
+&lt;application PropertyName="PropertyValue" ...&gt;
+ &lt;paths&gt;
+ &lt;alias id="AliasID" path="AliasPath" /&gt;
+ &lt;using namespace="Namespace" /&gt;
+ &lt;/paths&gt;
+ &lt;modules&gt;
+ &lt;module id="ModuleID" class="ModuleClass" PropertyName="PropertyValue" ... /&gt;
+ &lt;/modules&gt;
+ &lt;services&gt;
+ &lt;service id="ServiceID" class="ServiceClass" PropertyName="PropertyValue" ... /&gt;
+ &lt;/services&gt;
+ &lt;parameters&gt;
+ &lt;parameter id="ParameterID" class="ParameterClass" PropertyName="PropertyValue" ... /&gt;
+ &lt;/parameters&gt;
+&lt;/application&gt;
+</pre>
+<ul>
+<li>The outermost element <code>&lt;application&gt;</code> corresponds to the <code>TApplication</code> instance. The <code>PropertyName="PropertyValue"</code> pairs specify the initial values for the properties of <code>TApplication</code>.</li>
+<li>The <code>&lt;paths&gt;</code> element contains the definition of path aliases and the PHP inclusion paths for the application. Each path alias is specified via an <code>&lt;alias&gt;</code> whose <code>path</code> attribute takes an absolute path or a path relative to the directory containing the application configuration file. The <code>&lt;using&gt;</code> 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: <code>System</code> and <code>Application</code>. The former refers to the PRADO framework root directory, and the latter refers to the directory containing the application configuration file.</li>
+<li>The <code>&lt;modules&gt;</code> element contains the configurations for a list of modules. Each module is specified by a <code>&lt;module&gt;</code> element. Each module is uniquely identified by the <code>id</code> attribute and is of type <code>class</code>. The <code>PropertyName="PropertyValue"</code> pairs specify the initial values for the properties of the module.</li>
+<li>The <code>&lt;services&gt;</code> element is similar to the <code>&lt;modules&gt;</code> element. It mainly specifies the services provided by the application.</li>
+<li>The <code>&lt;parameters&gt;</code> 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">
+&lt;parameter id="ParameterID"&gt;ParameterValue&lt;/parameter&gt;
+</pre>
+</li>
+</ul>
+By default without explicit configuration, a PRADO application when running will load a few core modules, such as <code>THttpRequest</code>, <code>THttpResponse</code>, etc. It will also provide the <code>TPageService</code> 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.
+</p>
+
+</com:TContent> \ No newline at end of file