* @author Louis Lapointe * @link http://pmo.developpez.com/ * @since PhpMyObject v0.14 * @version $Revision: $ * @copyright Copyright (C) 2007-2008 Nicolas Boiteux * @copyright Copyright (C) 2008 Louis Lapointe * @license GPLv3 {@link http://www.gnu.org/licenses/gpl} * @filesource * */ /** * This interface defines the methods a class must implement * to provide a working configuration class to the PMO objects. * * @package PhpMyObject * @subpackage PMO_Core * @see PMO_MyConfig */ interface PMO_Config { /** * the implementation must return an instance. It it does not exists * it must be created. * * @return object an object derived from a class implementing this interface. */ static function factory(); /** * the implementation must set the passed variable name * with the passed value. If the variable does not aleady * exist, an exception must be thrown. * * @param string $varname the variable name to set * @param mixed $value the value to set the variable with * @return void * @throws exeception */ public function set($varname, $value=null); /** * the implementation must return the value of the passed variable name * or throw an exception if the variable does not exist. * * @param string $varname the variable name * @return mixed the variable value * @throws Exception if $varname does not exist */ public function get($varname); } ?>