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