|
@@ 1051-1061 (lines=11) @@
|
| 1048 |
|
* @param string $c |
| 1049 |
|
* @return CompressBzip2|CompressGzip|CompressNone |
| 1050 |
|
*/ |
| 1051 |
|
public static function create($c) |
| 1052 |
|
{ |
| 1053 |
|
$c = ucfirst(strtolower($c)); |
| 1054 |
|
if (! CompressMethod::isValid($c)) { |
| 1055 |
|
throw new Exception("Compression method ($c) is not defined yet"); |
| 1056 |
|
} |
| 1057 |
|
|
| 1058 |
|
$method = __NAMESPACE__ . "\\" . "Compress" . $c; |
| 1059 |
|
|
| 1060 |
|
return new $method; |
| 1061 |
|
} |
| 1062 |
|
} |
| 1063 |
|
|
| 1064 |
|
class CompressBzip2 extends CompressManagerFactory |
|
@@ 1202-1210 (lines=9) @@
|
| 1199 |
|
* @param string $c Type of database factory to create (Mysql, Sqlite,...) |
| 1200 |
|
* @param PDO $dbHandler |
| 1201 |
|
*/ |
| 1202 |
|
public static function create($c, $dbHandler = null) |
| 1203 |
|
{ |
| 1204 |
|
$c = ucfirst(strtolower($c)); |
| 1205 |
|
if (! TypeAdapter::isValid($c)) { |
| 1206 |
|
throw new Exception("Database type support for ($c) not yet available"); |
| 1207 |
|
} |
| 1208 |
|
$method = __NAMESPACE__ . "\\" . "TypeAdapter" . $c; |
| 1209 |
|
return new $method($dbHandler); |
| 1210 |
|
} |
| 1211 |
|
|
| 1212 |
|
/** |
| 1213 |
|
* function databases Add sql to create and use database |