Documentation is available at LoaderFactory.php
- <?php
- /**
- * MVCnPHP - LoaderFactory.class.php
- *
- * This source file is subject to version 2.02 of the PHP license,
- * that is bundled with this package in the file LICENSE, and is
- * available at through the world-wide-web at
- * http://www.php.net/license/2_02.txt.
- * If you did not receive a copy of the PHP license and are unable to
- * obtain it through the world-wide-web, please send a note to
- * license@php.net so we can mail you a copy immediately.
- *
- * @author Tony Bibbs <tony@geeklog.net>
- * @copyright Tony Bibbs 2003-2005
- * @package net.geeklog.mvc
- * @version $Id: LoaderFactory.class.php,v 1.3 2003/08/28 01:31:22 tony Exp $
- *
- */
- /**
- * Builds MVC Config Loaders
- *
- * I doubt much more besides arrays and XML files
- * will be used but just in case I used the factory
- * pattern in here to enable easily adding new configuration
- * data structures
- *
- * @author Tony Bibbs <tony@geeklog.net>
- * @package net.geeklog.mvc
- *
- */
- class MVCnPHP_LoaderFactory {
- /**
- * Builds requested MVC configuration loaders.
- *
- * Config loaders each represent one way of parsing
- * an MVC configuration data structure into the objects
- * needed by the controller.
- *
- * @author Tony Bibbs <tony@geeklog.net>
- * @access public
- * @param string $path Path to base MVC directory
- * @param int $configType Constant, either MVC_XML or MVC_ARRAY
- * @return object MVC config loader
- *
- */
- public function getLoader($configType = MVC_XML)
- {
- $filename = $configType . '.php';
- require_once $filename;
- $loaderClassName = 'MVCnPHP_' . $configType;
- return new $loaderClassName();
- }
- }
- ?>
Documentation generated on Mon, 7 Mar 2005 22:36:22 -0600 by phpDocumentor 1.3.0RC3