@@ 991-1001 (lines=11) @@ | ||
988 | * @param string $c |
|
989 | * @return CompressBzip2|CompressGzip|CompressNone |
|
990 | */ |
|
991 | public static function create($c) |
|
992 | { |
|
993 | $c = ucfirst(strtolower($c)); |
|
994 | if (! CompressMethod::isValid($c)) { |
|
995 | throw new Exception("Compression method ($c) is not defined yet"); |
|
996 | } |
|
997 | ||
998 | $method = __NAMESPACE__ . "\\" . "Compress" . $c; |
|
999 | ||
1000 | return new $method; |
|
1001 | } |
|
1002 | } |
|
1003 | ||
1004 | class CompressBzip2 extends CompressManagerFactory |
|
@@ 1142-1150 (lines=9) @@ | ||
1139 | * @param string $c Type of database factory to create (Mysql, Sqlite,...) |
|
1140 | * @param PDO $dbHandler |
|
1141 | */ |
|
1142 | public static function create($c, $dbHandler = null) |
|
1143 | { |
|
1144 | $c = ucfirst(strtolower($c)); |
|
1145 | if (! TypeAdapter::isValid($c)) { |
|
1146 | throw new Exception("Database type support for ($c) not yet available"); |
|
1147 | } |
|
1148 | $method = __NAMESPACE__ . "\\" . "TypeAdapter" . $c; |
|
1149 | return new $method($dbHandler); |
|
1150 | } |
|
1151 | ||
1152 | /** |
|
1153 | * function databases Add sql to create and use database |