| @@ 192-211 (lines=20) @@ | ||
| 189 | */ |
|
| 190 | public function library($library, $params = NULL, $object_name = NULL) |
|
| 191 | { |
|
| 192 | if (empty($library)) |
|
| 193 | { |
|
| 194 | return $this; |
|
| 195 | } |
|
| 196 | elseif (is_array($library)) |
|
| 197 | { |
|
| 198 | foreach ($library as $key => $value) |
|
| 199 | { |
|
| 200 | if (is_int($key)) |
|
| 201 | { |
|
| 202 | $this->library($value, $params); |
|
| 203 | } |
|
| 204 | else |
|
| 205 | { |
|
| 206 | $this->library($key, $params, $value); |
|
| 207 | } |
|
| 208 | } |
|
| 209 | ||
| 210 | return $this; |
|
| 211 | } |
|
| 212 | ||
| 213 | if ($params !== NULL && ! is_array($params)) |
|
| 214 | { |
|
| @@ 238-250 (lines=13) @@ | ||
| 235 | */ |
|
| 236 | public function model($model, $name = '', $db_conn = FALSE) |
|
| 237 | { |
|
| 238 | if (empty($model)) |
|
| 239 | { |
|
| 240 | return $this; |
|
| 241 | } |
|
| 242 | elseif (is_array($model)) |
|
| 243 | { |
|
| 244 | foreach ($model as $key => $value) |
|
| 245 | { |
|
| 246 | is_int($key) ? $this->model($value, '', $db_conn) : $this->model($key, $value, $db_conn); |
|
| 247 | } |
|
| 248 | ||
| 249 | return $this; |
|
| 250 | } |
|
| 251 | ||
| 252 | $path = ''; |
|
| 253 | ||
| @@ 721-740 (lines=20) @@ | ||
| 718 | */ |
|
| 719 | public function driver($library, $params = NULL, $object_name = NULL) |
|
| 720 | { |
|
| 721 | if (is_array($library)) |
|
| 722 | { |
|
| 723 | foreach ($library as $key => $value) |
|
| 724 | { |
|
| 725 | if (is_int($key)) |
|
| 726 | { |
|
| 727 | $this->driver($value, $params); |
|
| 728 | } |
|
| 729 | else |
|
| 730 | { |
|
| 731 | $this->driver($key, $params, $value); |
|
| 732 | } |
|
| 733 | } |
|
| 734 | ||
| 735 | return $this; |
|
| 736 | } |
|
| 737 | elseif (empty($library)) |
|
| 738 | { |
|
| 739 | return FALSE; |
|
| 740 | } |
|
| 741 | ||
| 742 | if ( ! class_exists('CI_Driver_Library', FALSE)) |
|
| 743 | { |
|