OSDN Git Service

[add] initialize
[converter/converter.git] / lib / Converter / Factory.class.php
1 <?php
2 /* vim: set expandtab tabstop=4 shiftwidth=4: */
3 // +----------------------------------------------------------------------+
4 // | PHP Version 5                                                        |
5 // +----------------------------------------------------------------------+
6 // | Copyright (c) 2010 Takahiro Ooishi                                   |
7 // +----------------------------------------------------------------------+
8 // | This source file is subject to version 3.0 of the PHP license,       |
9 // | that is bundled with this package in the file LICENSE, and is        |
10 // | available through the world-wide-web at the following url:           |
11 // | http://www.php.net/license/3_0.txt.                                  |
12 // | If you did not receive a copy of the PHP license and are unable to   |
13 // | obtain it through the world-wide-web, please send a note to          |
14 // | license@php.net so we can mail you a copy immediately.               |
15 // +----------------------------------------------------------------------+
16 // | Author: Takahiro Ooishi <taka0125.biz@gmail.com>                     |
17 // +----------------------------------------------------------------------+
18 //
19 // $Id$
20
21 class Converter_Factory
22 {
23     static function create($extension)
24     {
25         if ($extension === 'pdf') return new Converter_Pdf();
26         throw new Exception("Converterer not found. [extension = $extension]");
27     }
28 }