loadStore($storeName); } protected function __construct() { } /** * @param string $store * * @return Store; */ public function loadStore($store) { if (!isset($this->loadedStores[$store])) { $class = 'PHPCensor\\Store\\' . $store . 'Store'; $obj = new $class(); $this->loadedStores[$store] = $obj; } return $this->loadedStores[$store]; } }