Location: PHPKode > scripts > FuseBox Manager > fusebox-manager/FuseBoxXMLParsersFactory.class.php
<?
/*
- author: Skakunov Alexander [hide@address.com]
- filename: FuseBoxXMLParsersFactory.class.php
- date: 28.05.2007
- description: FuseBoxXMLParsersFactory is a Factory pattern implementation to play with parsers in easy way
*/

class FuseBoxXMLParsersFactory
{
  public function __construct()
  {
  }

  public function &getParser($API_name, $xml)
  {
    $className = 'FuseBoxXMLParser_' . ucfirst(strtolower($API_name));
    
    if (!include_once(dirname(__FILE__) . '/' . $className . '.class.php'))
    {
      return false;
    }
    
    $instance = new $className($xml);
    
    return $instance;
  }
    
}
?>
Return current item: FuseBox Manager