@@ 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 |
@@ 528-534 (lines=7) @@ | ||
525 | * |
|
526 | * @return mixed |
|
527 | */ |
|
528 | public function getVar( $name, $default = null ) { |
|
529 | if ( !isset( $this->settings[$name] ) ) { |
|
530 | return $default; |
|
531 | } else { |
|
532 | return $this->settings[$name]; |
|
533 | } |
|
534 | } |
|
535 | ||
536 | /** |
|
537 | * Get a list of DBs supported by current PHP setup |