summaryrefslogtreecommitdiff
path: root/demos/quickstart/protected/pages
diff options
context:
space:
mode:
Diffstat (limited to 'demos/quickstart/protected/pages')
-rw-r--r--demos/quickstart/protected/pages/Configurations/AppConfig.page57
-rw-r--r--demos/quickstart/protected/pages/GettingStarted/NewFeatures.page12
2 files changed, 66 insertions, 3 deletions
diff --git a/demos/quickstart/protected/pages/Configurations/AppConfig.page b/demos/quickstart/protected/pages/Configurations/AppConfig.page
index 83f1bc7e..7887d959 100644
--- a/demos/quickstart/protected/pages/Configurations/AppConfig.page
+++ b/demos/quickstart/protected/pages/Configurations/AppConfig.page
@@ -56,4 +56,61 @@ An external configuration file has the same format as described above. Although
By default without explicit configuration, a PRADO application 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.
</p>
+<com:SinceVersion Version="3.2.2" />
+<p class="block-content">
+By default PRADO instanciates all modules defined in the application configuration at the beginning of the application lifecycle. This can hit the application performance if you have a lot of modules defined but not used at every request.
+Since version 3.2.2 you can set the <tt>lazy</tt> property on modules defined in the application configuration to enable the lazy loading of that module.
+
+<com:TTextHighlighter Language="xml" CssClass="source block-content">
+ <modules>
+ <module id="ModuleID" class="ModuleClass" lazy="true" PropertyName="PropertyValue" ... />
+ </modules>
+</com:TTextHighlighter>
+
+A module with the <tt>lazy</tt> property set won't be instanciated until the first time it gets actually used by the application:
+
+<com:TTextHighlighter Language="php" CssClass="source block-content">
+ // requesting the lazy module to the application will instanciate it
+ Prado::getApplication()->getModule('ModuleID');
+</com:TTextHighlighter>
+</p>
+
+<com:SinceVersion Version="3.2" />
+<p class="block-content">
+Since version 3.2 the application configuration can be stored in PHP array format in a file named <tt>application.php</tt>.
+The format of the configuration file is exactly the same of its XML counterpart, but following the PHP syntax.
+</p>
+
+<com:TTextHighlighter Language="php" CssClass="source block-content">
+<?php
+return array(
+ 'application' => array(
+ 'PropertyName' => 'PropertyValue'
+ ),
+ 'modules' => array(
+ 'ModuleID' => array(
+ 'class' => 'ModuleClass',
+ 'properties' => array(
+ 'PropertyName' => 'PropertyValue'
+ ),
+ ),
+ ),
+ 'services' => array(
+ 'ServiceID' => array(
+ 'class' => 'ServiceClass',
+ 'properties' => array(
+ 'PropertyName' => 'PropertyValue'
+ ),
+ ),
+ ),
+);
+</com:TTextHighlighter>
+
+The use of a PHP application configuration must be defined in the <tt>TApplication</tt> constructor, tipically located in the <tt>index.php</tt> entry script:
+
+<com:TTextHighlighter Language="php" CssClass="source block-content">
+$application=new TApplication('protected',false,TApplication::CONFIG_TYPE_PHP);
+$application->run();
+</com:TTextHighlighter>
+
</com:TContent>
diff --git a/demos/quickstart/protected/pages/GettingStarted/NewFeatures.page b/demos/quickstart/protected/pages/GettingStarted/NewFeatures.page
index 98adc925..3db90fdc 100644
--- a/demos/quickstart/protected/pages/GettingStarted/NewFeatures.page
+++ b/demos/quickstart/protected/pages/GettingStarted/NewFeatures.page
@@ -6,11 +6,17 @@
This page summarizes the main new features that are introduced in each PRADO release.
</p>
+<h2>Version 3.2.2</h2>
+<ul>
+<li>TUrlMappingPattern support for constant parameters</li>
+<li>Lazy module loading in application configuration</li>
+</ul>
+
<h2 id="8001">Version 3.2.1</h2>
<ul>
-<li>TSecurityManager has been enhanced to support all the ciphers available in php</a></li>
-<li>Added a new UrlFormat for TUrlManager: HiddenPath; works like the 'Path' format, but hides the entryscript.php name</a></li>
-<li>Updated external packages</a></li>
+<li>TSecurityManager has been enhanced to support all the ciphers available in php</li>
+<li>Added a new UrlFormat for TUrlManager: HiddenPath; works like the 'Path' format, but hides the entryscript.php name</li>
+<li>Updated external packages</li>
</ul>
<h2 id="8001">Version 3.2.0</h2>