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

Class: PMO_MyConfig

Source Location: /fichiers/v0.15/PMO_core/PMO_MyConfig.php

Class Overview


PMO_MyConfig manages your system configuration.


Implements interfaces:

Variables

Methods



Class Details

[line 49]
PMO_MyConfig manages your system configuration.

Use this class to takes care of database config and paths to the class_loader/ and PMO_MyTable/ directories




[ Top ]


Class Variables

static $INSTANCE =

[line 57]

the static instance of PMO_MyConfig that will be returned



Tags:

access:  protected

Type:   object


[ Top ]

$structure =

[line 98]

PMO_Myarray where the PMO configuration variables are stored

On instanciation, this array is filled with default values for the collector name, classpaths and classname prefixes. The database configuration properties are set to empty strings for wich you will need to provide values.

PhpMyObject Configuration Properties:

  • PMO_MyController.OBJECT_COLLECTOR_NAME = "collector"
  • PMO_MyDbms.DRIVER = ""
  • PMO_MyDbms.PDODRIVER = ""
  • PMO_MyDbms.HOST = ""
  • PMO_MyDbms.BASE = ""
  • PMO_MyDbms.USER = ""
  • PMO_MyDbms.PASS = ""
  • PMO_MyDbms.DSN = ""
  • PMO_MyDbms.LOG = FALSE
  • PMO_MyDbms.LOG_FORMAT = "Y-m-d H:i:s"
  • PMO_MyObject.CLASSPATH = dirname(__FILE__).'/../class_loader/'; located at the same level as PMO_Core
  • PMO_MyObject.CLASS_FILENAME_PREFIX = "class_"; prefix to use before table names in the class_loader directory
  • PMO_MyTable.CLASSPATH = dirname(__FILE__).'/PMO_MyTable/'; located under PMO_Core
  • PMO_MyTable.CLASS_FILENAME_PREFIX = "PMO_MyTable_"; prefix to use in naming the table file names that are persisted by PMO
  • PMO_MyMemCache.ACTIVE = FALSE
  • PMO_MyMemCache.HOST = ""
  • PMO_MyMemCache.PORT = ""
  • PMO_MyMemCache.TIMEOUT = 10




Tags:

access:  protected

Type:   array


[ Top ]



Class Methods


static method factory [line 167]

static PMO_MyConfig factory( )

Returns the PMO_MyConfig instance.

If the instance does not exist yet, it is created.




Tags:

return:  the PMO_MyConfig instance.
access:  public



Implementation of:
PMO_Config::factory()
the implementation must return an instance. It it does not exists it must be created.
[ Top ]

method get [line 225]

mixed get( string $varname)

Returns the value of a PMO_MyConfig variable.

Will throw an exception if the variable is undefined.




Tags:

throws:  Exception thrown if the variable does not exist.
access:  public



Implementation of:
PMO_Config::get()
the implementation must return the value of the passed variable name or throw an exception if the variable does not exist.

Parameters:

string   $varname   variable to read. Must exist.

[ Top ]

method set [line 188]

void set( string $varname, [mixed $value = null])

Sets a PMO_MyConfig variable.

Example:

  1.  $conf PMO_MyConfig::factory();
  2.  $conf->set('PMO_MyDbms.HOST''localhost');




Tags:

access:  public



Implementation of:
PMO_Config::set()
the implementation must set the passed variable name with the passed value.

Parameters:

string   $varname   the variable name
mixed   $value   the value to set the variable with

[ Top ]

method show [line 155]

void show( )

var_dump all configuration



Tags:

access:  public


[ Top ]

method __get [line 212]

mixed __get( string $varname)

alias of the get() function



Tags:

throws:  Exception
access:  public


Parameters:

string   $varname   Variable to read. Must exist.

[ Top ]

method __set [line 201]

void __set( string $varname, mixed $value)

alias of the set() function



Tags:

access:  public


Parameters:

string   $varname   the variable name
mixed   $value   the value to set the variable with

[ Top ]


Documentation generated on Wed, 15 Oct 2008 09:16:50 -0400 by phpDocumentor 1.4.1