User management for the world wide web

Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members

View.php

00001 <?php
00019 class GenieGate_View {
00020     
00021     var $PARAM = array();
00022 
00036   function param($param = FALSE, $value = FALSE) {
00037     if(! $param){
00038       return($this->PARAM);
00039     }
00040     $rv = $this->PARAM[$param];
00041     if($value){
00042       $this->PARAM[$param] = $value;
00043     }
00044     // Deal with empty arrays.
00045     if(is_array($value)){
00046       $this->PARAM[$param] = $value;
00047     }
00048     return($rv);
00049   }
00050 
00051 
00056   function display(){ }
00057 
00058 
00066   function getLink($qry = array()) {
00067     $qs = "?";
00068 
00069     foreach($qry as $p => $v){
00070       $qs .= sprintf("%s=%s&",urlencode($p),urlencode($v));
00071     }
00072     if(strlen($qs) > 1){
00073       $qs = substr($qs,0,(strlen($qs) - 1));
00074     }else{
00075       $qs = "";
00076     }
00077     return("http://" . $_SERVER[SERVER_NAME] . $_SERVER[PHP_SELF] . $qs); 
00078   }
00079 
00080 
00081 }
00082 
00083 
00084 ?>

DoxyGen Documentation generated by DoxyGen