@@ 1069-1079 (lines=11) @@ | ||
1066 | * @param string $c |
|
1067 | * @return CompressBzip2|CompressGzip|CompressNone |
|
1068 | */ |
|
1069 | public static function create($c) |
|
1070 | { |
|
1071 | $c = ucfirst(strtolower($c)); |
|
1072 | if (! CompressMethod::isValid($c)) { |
|
1073 | throw new Exception("Compression method ($c) is not defined yet"); |
|
1074 | } |
|
1075 | ||
1076 | $method = __NAMESPACE__ . "\\" . "Compress" . $c; |
|
1077 | ||
1078 | return new $method; |
|
1079 | } |
|
1080 | } |
|
1081 | ||
1082 | class CompressBzip2 extends CompressManagerFactory |
|
@@ 1220-1228 (lines=9) @@ | ||
1217 | * @param string $c Type of database factory to create (Mysql, Sqlite,...) |
|
1218 | * @param PDO $dbHandler |
|
1219 | */ |
|
1220 | public static function create($c, $dbHandler = null) |
|
1221 | { |
|
1222 | $c = ucfirst(strtolower($c)); |
|
1223 | if (! TypeAdapter::isValid($c)) { |
|
1224 | throw new Exception("Database type support for ($c) not yet available"); |
|
1225 | } |
|
1226 | $method = __NAMESPACE__ . "\\" . "TypeAdapter" . $c; |
|
1227 | return new $method($dbHandler); |
|
1228 | } |
|
1229 | ||
1230 | /** |
|
1231 | * function databases Add sql to create and use database |