PRADO Component Framework for PHP 5
  • Home
  • About
  • Testimonials
  • Demos
  • Download
  • Documentation
  • Forum
  • Development
  • Tutorials
  • Class Docs
  • API Manual
  • Wiki

Packages

  • None
  • System
    • Caching
    • Collections
    • Data
      • ActiveRecord
        • Relations
        • Scaffold
          • InputBuilder
      • Commom
        • Sqlite
      • Common
        • Mssql
        • Mysql
        • Oracle
        • Pgsql
        • Sqlite
      • DataGateway
      • SqlMap
        • Configuration
        • Statements
    • Exceptions
    • I18N
    • IO
    • Security
    • Util
    • Web
      • Javascripts
      • Services
      • UI
        • ActiveControls
        • WebControls
    • Xml
  • Wsat
    • pages
  • Overview
  • Package
  • Class
  • Tree
  • Deprecated
  • Todo

Class TParameterModule

TParameterModule class

TParameterModule enables loading application parameters from external storage other than the application configuration. To load parameters from an XML file, configure the module by setting its setParameterFile ParameterFile property. Note, the property only accepts a file path in namespace format with file extension being '.xml'. The file format is as follows, which is similar to the parameter portion in an application configuration,

<parameters>
  <parameter id="param1" value="paramValue1" />
  <parameter id="param2" Property1="Value1" Property2="Value2" ... />
</parameters>

In addition, any content enclosed within the module tag is also treated as parameters, e.g.,

<module class="System.Util.TParameterModule">
  <parameter id="param1" value="paramValue1" />
  <parameter id="param2" Property1="Value1" Property2="Value2" ... />
</module>

If a parameter is defined both in the external file and within the module tag, the former takes precedence.

TComponent
Extended by TApplicationComponent
Extended by TModule implements IModule
Extended by TParameterModule
Package: System\Util
Copyright: Copyright © 2005-2014 PradoSoft
License: http://www.pradosoft.com/license/
Author: Qiang Xue <qiang.xue@gmail.com>
Author: Carl G. Mathisen <carlgmathisen@gmail.com>
Since: 3.0
Located at Util/TParameterModule.php
Methods summary
public
# init( mixed $config )

Initializes the module by loading parameters.

Initializes the module by loading parameters.

Parameters

$config
mixed
content enclosed within the module tag

Overrides

TModule::init()
protected
# loadParameters( mixed $config )

Loads parameters into application.

Loads parameters into application.

Parameters

$config
mixed
XML of PHP representation of the parameters

Throws

TConfigurationException
if the parameter file format is invalid
public string
# getParameterFile( )

Returns

string
the parameter file path
public
# setParameterFile( string $value )

Parameters

$value
string
the parameter file path. It must be in namespace format and the file extension is '.xml'.

Throws

TInvalidOperationException
if the module is initialized
TConfigurationException
if the file is invalid
Methods inherited from TModule
getID(), setID()
Methods inherited from TApplicationComponent
getApplication(), getRequest(), getResponse(), getService(), getSession(), getUser(), publishAsset(), publishFilePath()
Methods inherited from TComponent
__call(), __construct(), __destruct(), __get(), __isset(), __set(), __sleep(), __unset(), __wakeup(), addParsedObject(), asa(), attachBehavior(), attachBehaviors(), attachClassBehavior(), attachEventHandler(), canGetProperty(), canSetProperty(), clearBehaviors(), createdOnTemplate(), detachBehavior(), detachBehaviors(), detachClassBehavior(), detachEventHandler(), disableBehavior(), disableBehaviors(), enableBehavior(), enableBehaviors(), evaluateExpression(), evaluateStatements(), fxAttachClassBehavior(), fxDetachClassBehavior(), getAutoGlobalListen(), getBehaviorsEnabled(), getClassHierarchy(), getEventHandlers(), getListeningToGlobalEvents(), getSubProperty(), hasEvent(), hasEventHandler(), hasProperty(), isa(), listen(), raiseEvent(), setSubProperty(), unlisten()
Constants summary
string PARAM_FILE_EXT '.xml'
#

Deprecated

since 3.2
Constants inherited from TComponent
GLOBAL_RAISE_EVENT_LISTENER
Terms of Service | Contact Us
PRADO v3.2.4 API Manual API documentation generated by ApiGen 2.8.0
Copyright © 2006-2014 by the PRADO Group.
Powered by PRADO