Config
[ class tree: Config ] [ index: Config ] [ all elements ]

Class: Config_Container_PHPArray

Source Location: /Config-1.10.12/Config/Container/PHPArray.php

Class Overview


Config parser for common PHP configuration array such as found in the horde project.


Author(s):

Variables

Methods


Inherited Variables

Inherited Methods


Class Details

[line 34]
Config parser for common PHP configuration array such as found in the horde project.

Options expected is: 'name' => 'conf' Name of the configuration array. Default is $conf[]. 'useAttr' => true Whether we render attributes



[ Top ]


Class Variables

$options = array('name' => 'conf',
                         'useAttr' => true,
                         'duplicateDirectives' => true)

[line 48]

This class options:

  • name of the config array to parse/output Ex: $options['name'] = 'myconf';
  • Whether to add attributes to the array Ex: $options['useAttr'] = false;
  • Whether to treat numbered arrays as duplicates of their parent directive or as individual directives Ex: $options['duplicateDirectives'] = false;


Type:   array


[ Top ]



Method Detail

Config_Container_PHPArray (Constructor)   [line 58]

Config_Container_PHPArray Config_Container_PHPArray( [string $options = array()])

Constructor
  • Access: public

Parameters:

string   $options   —  Options to be used by renderer

[ Top ]

parseDatasrc   [line 73]

mixed &parseDatasrc( string $datasrc, &$obj, object $obj)

Parses the data of the given configuration file
  • Return: returns a PEAR_ERROR, if error occurs or true if ok
  • Access: public

Parameters:

string   $datasrc   —  path to the configuration file
object   $obj   —  reference to a config object
   &$obj   — 

[ Top ]

toString   [line 146]

string toString( &$obj, object $obj)

Returns a formatted string of the object
  • Access: public

Parameters:

object   $obj   —  Container object to be output as string
   &$obj   — 

[ Top ]

writeDatasrc   [line 242]

string writeDatasrc( mixed $datasrc, string &$obj)

Writes the configuration to a file
  • Access: public

Parameters:

mixed   $datasrc   —  datasrc info on datasource such as path to the configuraton file
string   &$obj   —  configType (optional)type of configuration

[ Top ]


Documentation generated on Mon, 11 Mar 2019 15:42:04 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.