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

Source for file PMO_Config.php

Documentation is available at PMO_Config.php

  1. <?php
  2. /**
  3.  * This file contains the PMO_Config interface.
  4.  *
  5.  * This file is part of the PhpMyObject project,
  6.  * an Object-Relational Mapping (ORM) system.
  7.  * 
  8.  * For questions, help, comments, discussion, etc., please join our
  9.  * forum at {@link http://www.developpez.net/forums/forumdisplay.php?f=770}
  10.  * or our mailing list at {@link http://groups.google.com/group/pmo-dev}.
  11.  *
  12.  * PhpMyObject is free software: you can redistribute it and/or modify
  13.  * it under the terms of the GNU General Public License as published by
  14.  * the Free Software Foundation, either version 3 of the License, or
  15.  * (at your option) any later version.
  16.  *
  17.  * This program is distributed in the hope that it will be useful,
  18.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  19.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.    See the
  20.  * GNU General Public License for more details.
  21.  *
  22.  * You should have received a copy of the GNU General Public License
  23.  * along with this program.  If not, see {@link http://www.gnu.org/licenses/}.
  24.  *
  25.  * @package            PhpMyObject
  26.  * @subpackage     PMO_Core
  27.  * @author            Nicolas Boiteux <nicolas_boiteux@yahoo.fr>
  28.  * @link                http://pmo.developpez.com/
  29.  * @since            PhpMyObject v0.14
  30.  * @version            $Revision: $
  31.  * @copyright        Copyright (C) 2007-2008 Nicolas Boiteux
  32.  * @license            GPLv3 {@link http://www.gnu.org/licenses/gpl}
  33.  * @filesource
  34.  *
  35.  */ 
  36.  
  37. /**
  38.  * This interface defines the methods a class must implement
  39.  * to provide a working configuration class to the PMO objects.
  40.  * 
  41.  * @package        PhpMyObject
  42.  * @subpackage PMO_Core
  43.  * @see            PMO_MyConfig
  44.  */ 
  45. interface PMO_Config {
  46.  
  47.     /**
  48.      * the implementation must return an instance. It it does not exists
  49.      * it must be created.
  50.      *
  51.      * @return object  an object derived from a class implementing this interface.
  52.      */
  53.     static function factory();
  54.  
  55.     /**
  56.      * the implementation must set the passed variable name
  57.      * with the passed value.
  58.      *
  59.      * @param string $varname    the variable name to set
  60.      * @param mixed  $value        the value to set the variable with
  61.      * @return void 
  62.      */
  63.     public function set($varname$value=null);
  64.  
  65.     /**
  66.      * the implementation must return the value of the passed variable name
  67.      * or throw an exception if the variable does not exist.
  68.      *
  69.      * @param string $varname    the variable name
  70.      * @return mixed                the variable value
  71.      * @throws Exception            if $varname does not exist
  72.      */
  73.     public function get($varname);
  74.  
  75.     /**
  76.      * the implementation must return true if the passed variable exists, false otherwise.
  77.      *
  78.      * @param string $varname        name of the variable to check for
  79.      * @return true|false           true if the variable exists, false otherwise
  80.      */
  81.     //public function exists($varname);
  82.  
  83. }
  84. ?>

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