Xem mẫu

Appendix getName( ) : string Gets the name of the element. Returns Element name render( &xmlElement : JSimpleXMLElement, value : string, control_ name : string=`params` ) : array Gets an array containing the rendered parts and attributes of the element. The array contains six items in order, tooltip [0], rendered input element [1], description [2], label [3], value [4], and name [5]. Parameters xmlElement value [control_name] JSimpleXMLElement element definition Element value Name of the control Returns An array containing rendered parts and attributes of the element JParameter extends JRegistry Handles INI string parameters. This class is used in conjunction with JElement subclasses and XML files that define the nature of parameters. INI strings are used in database tables for values that do not have a specific field. An instance of the class can be used to handle multiple INI strings (with different XML definitions), using groups to separate each one. When dealing with one INI string, omitting the group will always use the default group, `_default`. For more information about JParameter refer to the Parameters (Core JElements) section in this Appendix. Properties _elementPath : array _elements : array _raw : string _xml : array Array of paths in which to find JElement subclasses (not restricted to groups) Associative array of JElement objects (not restricted to groups) INI string Associative array of JSimpleXMLElement objects that define parameters (one object per group) Constructors __construct( data : string, path : string=`` ) : JParameter Builds a new JParameter object and loads data and, if specified, the XML file. Parameters data [path] INI string Path to XML file [ 419 ] Appendix Methods addElemenrPath( path : mixed ) : void Adds a path, or array of paths, to search for JElement subclass files. Parameters path Path or array of paths bind( data : mixed, group : string=` _default` ) : boolean Binds data with parameters in the specified group. data can be an associative array, an object, or an INI string. Parameters Returns data [group] true on success Data to bind Parameter group def( key : string, value : string=``, group : string= `_default` ) : string If the parameter is not defined, sets the value of the parameter in the specified group. Parameters key [value] [group] Parameter to get Value if not defined Parameter group Returns Up-to-date value of the parameter get( key : string, default : string=``, group : string=`_default` ) : string Gets the value of a parameter in the specified group. Returns the default value if the parameter is not set. Parameters Returns key [default] [group] Value of the parameter Parameter to retrieve Default value to return Parameter group getGroups( ) : mixed Gets an associative array of the group names and the number of parameters in each, defined by the corresponding JSimpleXMLElement object. Groups that do not have a JSimpleXMLElement object will not be included. Returns Associative array of group names and number of parameters in each. Returns false if no XML has been successfully loaded. [ 420 ] Appendix getNumParams( group : string=` _default` ) : mixed Gets the number of parameters defined by the associated JSimpleXMLElement object, in the specified group. Parameters [group] Parameter group Returns Number of parameters; false if no JSimpleXMLElement object exists getParam( &node : JSimpleXMLElement, control_name : string=`params`, group : string=` _default` ) : mixed Gets an array of parameter details from a group. The array contains six items in order: tooltip [0], HTML rendered string [1], description [2], label [3], value [4], and name [5]. Parameters Node [control_name] [group] JSimpleXMLElement parameter to render Input names Parameter group Returns Array of parameter details from a group getParams( name : string=`params`, group : string=` _default` ) : mixed Gets a two-dimensional array of all the parameters in a group. The inner arrays contain six items in order: tooltip [0], HTML rendered string [1], description [2], label [3], value [4], and name [5]. Parameters [name] Input names and ID prefix [group] Parameter group Returns Two-dimensional array of all the parameters in a group; false on failure &loadElement( type : string, new : boolean=false ) : mixed Gets an instance of a JElement subclass object based on type. If an instance of the specified type does not exist, it will be created. If new is true, a new instance will be created even if there is an existing instance. JElements subclass objects are not restricted to groups. Parameters path [new] Path to XML file Force create new instance Returns Instance of a JElement object; false on failure loadSetupFile( path : string ) : boolean Builds a JSimpleXMLElement object from an XML file. The XML file can include the group name; if it does not, the group `_default` will be assumed. Parameters Returns path Path to XML file true on success [ 421 ] Appendix render( name : string=`params`, group : string=` _default` ) : mixed Renders a group within the parameters and returns an HTML string. Parameters [name] [group] Input names and ID prefix Parameter group Returns HTML rendered string; false on failure renderToArray( name : string=`params`, group : string=` _default` ) : mixed Renders a group within the parameters and returns an array of HTML strings. Parameters [name] [group] Input names and ID prefix Parameter group Returns Array of HTML rendered parameters; false on failure set( key : string, value : string=``, group : string=`_default` ) : string Sets the value of a parameter in the specified group. Parameters key [value] [group] Parameter to set New value Parameter group Returns Previous value of the parameter setXML( &xml : JSimpleXMLElement ) : void Sets an XML definition; the group is extracted from the group attribute of the object. Parameters [xml] JSimpleXMLElement object to add JCache abstract, extends JObject Handles caching. Several subclasses exist for caching different items; subclasses are sometimes referred to as JCache types. JCache uses JCacheStorage subclass objects to store and retrieve cache data. Properties _handler : JCacheStorage _options : array Storage handler Cache handling options [ 422 ] Appendix Constructors __construct( options : array ) : JCache Builds a new JCache object. The options associative array can contain the keys language, cachebase, defaultgroup, caching, and storage. language is used to create separate caches for different languages. cachebase is used as the path to the base cache folder. defaultgroup is the group name used when no group is specified in other methods. caching is a Boolean value; if true caching is enabled. Cached data is identified by an ID and a group. The way the cache is stored differs, depending on the chosen storage handler. storage is a string that defines the default storage handler type. Parameters options Associative array of options Methods clean( group : string=null, mode : string=`group` ) : boolean Removes all cached items in group. If mode is `group`, removes all cached data in group, if mode is `notgroup`, removes all cached data in other groups. Parameters Returns [group] [mode] true on success Selected group Cleaning mode gc( ) : boolean Removes any redundant cached data (data that has expired). Returns true on success get( id : string, group : string=null ) : mixed Gets cached data. Cached data is identified by an ID and a group. Returns false if no cached data is available. Parameters id [group] Cached data ID Cached data group Returns Cached data; false if no cached data is found static &getInstance( type : string=`output`, options : array=array() ) : JCache Gets a new instance of a JCache subclass object based on type. options is passed to the constructor. Parameters [type] [options] JRegistry instance identifier Options to pass to the constructor Returns A new instance of a JCache derived object [ 423 ] ... - tailieumienphi.vn
nguon tai.lieu . vn