35 lines
658 B
PHP
35 lines
658 B
PHP
|
<?php
|
||
|
namespace Westdc\Metadata\Dataservice;
|
||
|
|
||
|
class Factory
|
||
|
{
|
||
|
private $namespace_root = "\\Westdc\\Metadata\\Dataservice\\";
|
||
|
|
||
|
function __construct()
|
||
|
{
|
||
|
|
||
|
}
|
||
|
|
||
|
static function Bootstrap($recordType)
|
||
|
{
|
||
|
$namespace_root = "\\Westdc\\Metadata\\Dataservice\\Extra";
|
||
|
|
||
|
$recordType = ucfirst($recordType);
|
||
|
|
||
|
$_class = $namespace_root . $recordType;
|
||
|
|
||
|
return new $_class;
|
||
|
}
|
||
|
|
||
|
static function Handle($recordType)
|
||
|
{
|
||
|
$namespace_root = "\\Westdc\\Metadata\\Dataservice\\Handle\\";
|
||
|
|
||
|
$recordType = ucfirst($recordType);
|
||
|
|
||
|
$_class = $namespace_root . $recordType . "Handle";
|
||
|
|
||
|
return new $_class;
|
||
|
}
|
||
|
|
||
|
}
|