westdc-zf1/application/module/Westdc/Visual/Factory.php

35 lines
587 B
PHP
Raw Normal View History

2014-05-12 06:53:21 +00:00
+<?php
namespace Westdc\Visual;
class Factory
{
private $namespace_root = "\\Visual\\Reader\\";
function __construct()
{
}
static function Bootstrap($recordType)
{
$namespace_root = "\\Visual\\Reader\\";
$recordType = ucfirst($recordType);
$_class = $namespace_root . $recordType;
return new $_class;
}
static function Handle($recordType)
{
$namespace_root = "\\Visual\\Handle\\";
$recordType = ucfirst($recordType);
$_class = $namespace_root . $recordType . "Handle";
return new $_class;
}
}