| @@ 477-483 (lines=7) @@ | ||
| 474 | * |
|
| 475 | * @return array |
|
| 476 | */ |
|
| 477 | public function getSession( $name, $default = null ) { |
|
| 478 | if ( !isset( $this->session[$name] ) ) { |
|
| 479 | return $default; |
|
| 480 | } else { |
|
| 481 | return $this->session[$name]; |
|
| 482 | } |
|
| 483 | } |
|
| 484 | ||
| 485 | /** |
|
| 486 | * Set a session variable. |
|
| @@ 74-80 (lines=7) @@ | ||
| 71 | * @param mixed $default Optional default (or null) |
|
| 72 | * @return mixed The value of the data requested or the deafult |
|
| 73 | */ |
|
| 74 | public function get( $name, $default = null ) { |
|
| 75 | if ( isset( $this->data[$name] ) ) { |
|
| 76 | return $this->data[$name]; |
|
| 77 | } else { |
|
| 78 | return $default; |
|
| 79 | } |
|
| 80 | } |
|
| 81 | ||
| 82 | /** |
|
| 83 | * @param string $name |
|
| @@ 532-538 (lines=7) @@ | ||
| 529 | * |
|
| 530 | * @return mixed |
|
| 531 | */ |
|
| 532 | public function getVar( $name, $default = null ) { |
|
| 533 | if ( !isset( $this->settings[$name] ) ) { |
|
| 534 | return $default; |
|
| 535 | } else { |
|
| 536 | return $this->settings[$name]; |
|
| 537 | } |
|
| 538 | } |
|
| 539 | ||
| 540 | /** |
|
| 541 | * Get a list of DBs supported by current PHP setup |
|