Helix Installation   Getting Started   Reference Documentation   Global Functions   Quick Start
ModulesClassesFunctions
 

Class Reference

class timeselect extends forminput

Hide Inherited MembersUser Interface
Description
No description.
 
Constants
constantTAGNAME [""][ timeselect ]
constantCONTENT [false][ timeselect ]
 
Properties
protected_ampm[ timeselect ]
publicattribute_list[ forminput ]
publicattributes[ element ]
protected_ddl_ampm[ timeselect ]
protected_ddl_hour[ timeselect ]
protected_ddl_minute[ timeselect ]
private_delimiter_pattern[ timeselect ]
protected_dirty[ obj ]
protected_entities[ forminput ]
protected_formatted_value[ timeselect ]
protected_hour[ timeselect ]
protected_minute[ timeselect ]
publicoptions[ timeselect ]
publicproperty_objects_array[ obj ]
protected_valid[ forminput ]
protected_validation[ forminput ]
protected_value[ timeselect ]
 
Methods
protectedbuild_attributes ( )[ forminput ]
Parameters
No parameters for this method
Code
022  protected function build_attributes()
023  {
024      global $controls;
025      if (is_array($controls) && array_key_exists($this->name,$controls))
026      {
027          $valid = $controls[$this->name]->valid;
028          $space = ($this->classname) ? " " : null;
029          $this->classname .= ($valid) ? null : "${space}invalid";
030      }
031      $attributes = "";
032      $this->id = is_null($this->id) ? (is_null($this->name) ? unique() : $this->name) : $this->id; // MAKE SURE ALL INPUTS HAVE AN ID
033      if(strstr($this->id,"[]"))
034      {
035          //for arrays of inputs that were contructed by the name, the id will be invalid
036          //re-assign to a unique number
037          $this->id = unique();
038      }
039      foreach ($this->attribute_list as $k=>$v)
040      {
041          if (preg_match("/selected|checked|readonly|disabled|multiple/i",$k))
042          {
043              $v = ($v) ? $k : null;
044          }
045          if (preg_match("/name/i",$k))
046          {
047              $v .= (keyval($this->attribute_list,"multiple")) ? "[]" : null;
048          }
049          $replace_spaces = ($k=="value") ? true : false;
050          if ($this->_entities)
051          {
052              $attributes .= (!is_null($v)) ? " " . $k . "=\"" . ent($v,$replace_spaces) . "\"" : null;
053          }
054          else
055          {
056              $attributes .= (!is_null($v)) ? " " . $k . "=\"" . $v . "\"" : null;
057          }
058      }
059      return $attributes;
060  }
public__construct ( name , value , minute_interval [15] )[ timeselect ]
Parameters
optionalname
optionalvalue
optionalminute_interval [15]
Code
017  public function __construct($name=null,$value=null,$minute_interval=15)
018  {
019      parent::__construct();
020     
021      $this->name = $name;
022      $this->_delimiter_pattern = "/[:\s]+/";
023          $this->_ddl_hour = new select($this->name . "[hour]");
024          $this->_ddl_hour->id = $this->_ddl_hour->name;
025          $this->_ddl_minute = new select($this->name . "[minute]");
026          $this->_ddl_minute->id = $this->_ddl_minute->name;
027          $this->_ddl_ampm = new select($this->name . "[ampm]");
028          $this->_ddl_ampm->id = $this->_ddl_ampm->name;
029 
030          $this->_ddl_hour->add("","");
031          for ($i=1; $i<=12; $i++)
032          {
033              $hour = $i==1 ? 12 : lpad($i-1,2,"0");
034              $this->_ddl_hour->add($hour,$hour);
035          }
036         
037          $this->_ddl_minute->add("","");
038          for ($i=0; $i<60; $i+=$minute_interval)
039          {
040              $minute = lpad($i,2,"0");
041              $this->_ddl_minute->add($minute,$minute);
042          }
043         
044          $this->_ddl_ampm->add("","");
045          $this->_ddl_ampm->add("am","am");
046          $this->_ddl_ampm->add("pm","pm");
047 
048      $this->value = ($this->_valid_time($value)) ? $value : "";
049  }
public__get ( p )[ obj ]
Parameters
requiredp
Code
007  public function __get($p)
008  {
009      $methods = get_class_methods($this);
010      $properties = get_object_vars($this);
011      if (in_array("get_$p",$methods))
012      {
013          return $this->{"get_$p"}();
014      }
015      else if (array_key_exists("_$p",$properties))
016      {
017          return $this->{"_$p"};
018      }
019      else if (in_array("get_" . substr($p,strpos($p,"_")+1), $methods))
020      {
021          return $this->{"get_" . substr($p,strpos($p,"_")+1)}(substr($p,0,strpos($p,"_")));
022      }
023      else
024      {
025          trigger_error("This object [" . get_class($this) . ":$this->id] has no private property '_$p' for the requested public property '$p'",E_USER_WARNING);
026          return null;
027      }
028  }
publicget_array ( )[ obj ]
Parameters
No parameters for this method
Code
096  public function get_array()
097  {
098      return get_object_vars($this);
099  }
publicget_attribute_string ( )[ element ]
Parameters
No parameters for this method
Code
017  public function get_attribute_string()
018  {
019      $attributes = array();
020      foreach ($this->attributes as $k=>$v)
021      {
022          $v = preg_match("/selected|checked|readonly|disabled|multiple/i",$k) ? ($v ? $k : null) : $v;
023          $v = ($k=="style") ? $this->style_string : $v;
024          $v = (preg_match("/name/i",$k) && keyval($this->attributes,"multiple")) ? ($v . "[]") : $v;
025          if (is_null($v))
026          {
027              continue;
028          }
029          $attributes[] = $k . "=\"" . ent($v) . "\"";
030      }
031      return implode(" ",$attributes);
032  }
publicget_classname ( )[ forminput ]
Parameters
No parameters for this method
Code
068  public function get_classname() {return keyval($this->attribute_list,"class");}
publicget_direction ( )[ forminput ]
Parameters
No parameters for this method
Code
083  public function get_direction() {return keyval($this->attribute_list,"dir");}
publicget_dirty ( )[ obj ]
Parameters
No parameters for this method
Code
063  public function get_dirty()
064  {
065      if ($this->id === 0)
066      {
067          $this->_dirty = true;
068      }
069      else
070      {
071          foreach (get_object_vars($this) as $k=>$v)
072          {
073              if ($this->_dirty)
074              {
075                  break;
076              }
077              if (preg_match('/_dirty$/',$k))
078              {
079                  $this->_dirty = $this->_dirty || $v;
080              }
081          }
082      }
083      return $this->_dirty;
084  }
publicget_disabled ( )[ forminput ]
Parameters
No parameters for this method
Code
128  public function get_disabled() {return keyval($this->attribute_list,"disabled");}
publicget_id ( )[ forminput ]
Parameters
No parameters for this method
Code
065  public function get_id() {return keyval($this->attribute_list,"id");}
publicget_json ( )[ obj ]
Parameters
No parameters for this method
Code
101  public function get_json()
102  {
103      $class = new ReflectionClass($this->classname);
104      $methods = $class->getMethods();
105      usort($methods,"sort_reflection_objects");
106      $accessors = array();
107      foreach ($methods as $index=>$method)
108      {
109          $declarer = $method->getDeclaringClass()->name;
110          if (preg_match('/^(get|set|)_(.+)$/',$method->name,$matches))
111          {
112              $accessor = $matches[2];
113              $getset = $matches[1];
114              eval("\$accessors[\$accessor] = \$this->".$accessor.";");
115          }
116      }
117      //return json_encode($this->get_array());
118      return json_encode($accessors);
119  }
publicget_lang ( )[ forminput ]
Parameters
No parameters for this method
Code
077  public function get_lang() {return keyval($this->attribute_list,"lang");}
publicget_name ( )[ forminput ]
Parameters
No parameters for this method
Code
134  public function get_name() {return keyval($this->attribute_list,"name");}
publicget_onblur ( )[ forminput ]
Parameters
No parameters for this method
Code
119  public function get_onblur() {return keyval($this->attribute_list,"onblur");}
publicget_onchange ( )[ forminput ]
Parameters
No parameters for this method
Code
122  public function get_onchange() {return keyval($this->attribute_list,"onchange");}
publicget_onclick ( )[ forminput ]
Parameters
No parameters for this method
Code
086  public function get_onclick() {return keyval($this->attribute_list,"onclick");}
publicget_ondblclick ( )[ forminput ]
Parameters
No parameters for this method
Code
089  public function get_ondblclick() {return keyval($this->attribute_list,"ondblclick");}
publicget_onfocus ( )[ forminput ]
Parameters
No parameters for this method
Code
116  public function get_onfocus() {return keyval($this->attribute_list,"onfocus");}
publicget_onkeydown ( )[ forminput ]
Parameters
No parameters for this method
Code
110  public function get_onkeydown() {return keyval($this->attribute_list,"onkeydown");}
publicget_onkeypress ( )[ forminput ]
Parameters
No parameters for this method
Code
107  public function get_onkeypress() {return keyval($this->attribute_list,"onkeypress");}
publicget_onkeyup ( )[ forminput ]
Parameters
No parameters for this method
Code
113  public function get_onkeyup() {return keyval($this->attribute_list,"onkeyup");}
publicget_onmousedown ( )[ forminput ]
Parameters
No parameters for this method
Code
092  public function get_onmousedown() {return keyval($this->attribute_list,"onmousedown");}
publicget_onmousemove ( )[ forminput ]
Parameters
No parameters for this method
Code
101  public function get_onmousemove() {return keyval($this->attribute_list,"onmousemove");}
publicget_onmouseout ( )[ forminput ]
Parameters
No parameters for this method
Code
104  public function get_onmouseout() {return keyval($this->attribute_list,"onmouseout");}
publicget_onmouseover ( )[ forminput ]
Parameters
No parameters for this method
Code
098  public function get_onmouseover() {return keyval($this->attribute_list,"onmouseover");}
publicget_onmouseup ( )[ forminput ]
Parameters
No parameters for this method
Code
095  public function get_onmouseup() {return keyval($this->attribute_list,"onmouseup");}
publicget_onselect ( )[ forminput ]
Parameters
No parameters for this method
Code
125  public function get_onselect() {return keyval($this->attribute_list,"onselect");}
publicget_properties ( )[ obj ]
Parameters
No parameters for this method
Code
121  public function get_properties()
122  {
123      return array_keys($this->array);
124  }
protectedget_string ( )[ obj ]
Parameters
No parameters for this method
Code
091  protected function get_string()
092  {
093      return method_exists($this,"__toString") ? $this->__toString() : null;
094  }
publicget_style ( )[ forminput ]
Parameters
No parameters for this method
Code
071  public function get_style() {return keyval($this->attribute_list,"style");}
publicget_style_string ( )[ element ]
Parameters
No parameters for this method
Code
034  public function get_style_string()
035  {
036      $styles = array();
037  //        foreach ($this->style as $k=>$v)
038  //        {
039  //            $styles[] = "$k:$v;";
040  //        }
041  //        $this->attributes["style"] .= implode("",$styles);
042      if (is_null(keyval($this->attributes,"style")))
043      {
044          return null;
045      }
046      else
047      {
048          return $this->attributes["style"];
049      }
050  }
publicget_tabindex ( )[ forminput ]
Parameters
No parameters for this method
Code
131  public function get_tabindex() {return keyval($this->attribute_list,"tabindex");}
publicget_title ( )[ forminput ]
Parameters
No parameters for this method
Code
074  public function get_title() {return keyval($this->attribute_list,"title");}
publicget_valid ( )[ forminput ]
Parameters
No parameters for this method
Code
062  public function get_valid() {return $this->validation->validate($this->name,$this->value);}
publicget_value ( )[ timeselect ]
Parameters
No parameters for this method
Code
144  public function get_value()
145  {
146      return $this->_value;
147  }
publicget_xml_lang ( )[ forminput ]
Parameters
No parameters for this method
Code
080  public function get_xml_lang() {return keyval($this->attribute_list,"xml:lang");}
publicrender ( )[ timeselect ]
Parameters
No parameters for this method
Code
051  public function render()
052  {
053      $o = "";
054      $o .= "<span id=\"$this->name\" class=\"timeselect\">";
055      $o .= $this->_ddl_hour->render();
056      //$o .= "&nbsp;:&nbsp;";
057      $o .= $this->_ddl_minute->render();
058      $o .= $this->_ddl_ampm->render();
059      $o .= "</span>";
060      return $o;
061  }
public__set ( p , v )[ obj ]
Parameters
requiredp
requiredv
Code
030  public function __set($p,$v)
031  {
032      $methods = get_class_methods($this);
033      $properties = get_object_vars($this);
034      if (in_array("set_$p",$methods))
035      {
036          $this->{"set_$p"}($v);
037      }
038      else if (array_key_exists("_$p",$properties))
039      {
040          if (!preg_match('/_dirty$/',$p) && property_exists($this,"_{$p}_dirty"))
041          {
042              if (is_object($this->{"_$p"}))
043              {
044                  $this->{"_$p"}->dirty = true;
045              }
046              else
047              {
048                  $this->{"_{$p}_dirty"} = $this->{$p}==$v ? false : true;
049              }
050          }
051          $this->{"_$p"} = $v;
052      }
053      else if (in_array("set_" . substr($p,strpos($p,"_")+1), $methods))
054      {
055          $this->{"set_" . substr($p,strpos($p,"_")+1)}($v,substr($p,0,strpos($p,"_")));
056      }
057      else
058      {
059          trigger_error("This object [" . get_class($this) . ":$this->id] has no private property '_$p' for the requested public property '$p'",E_USER_WARNING);
060      }
061  }
publicset_classname ( v )[ forminput ]
Parameters
requiredv
Code
069  public function set_classname($v) {$this->attribute_list["class"] = $v;}
publicset_direction ( v )[ forminput ]
Parameters
requiredv
Code
084  public function set_direction($v) {$this->attribute_list["dir"] = $v;}
publicset_disabled ( v )[ forminput ]
Parameters
requiredv
Code
129  public function set_disabled($v) {$this->attribute_list["disabled"] = $v;}
publicset_id ( v )[ forminput ]
Parameters
requiredv
Code
066  public function set_id($v) {$this->attribute_list["id"] = $v;}
publicset_lang ( v )[ forminput ]
Parameters
requiredv
Code
078  public function set_lang($v) {$this->attribute_list["lang"] = $v;}
publicset_name ( v )[ forminput ]
Parameters
requiredv
Code
135  public function set_name($v) {$this->attribute_list["name"] = $v;}
publicset_onblur ( v )[ forminput ]
Parameters
requiredv
Code
120  public function set_onblur($v) {$this->attribute_list["onblur"] = $v;}
publicset_onchange ( v )[ forminput ]
Parameters
requiredv
Code
123  public function set_onchange($v) {$this->attribute_list["onchange"] = $v;}
publicset_onclick ( v )[ forminput ]
Parameters
requiredv
Code
087  public function set_onclick($v) {$this->attribute_list["onclick"] = $v;}
publicset_ondblclick ( v )[ forminput ]
Parameters
requiredv
Code
090  public function set_ondblclick($v) {$this->attribute_list["ondblclick"] = $v;}
publicset_onfocus ( v )[ forminput ]
Parameters
requiredv
Code
117  public function set_onfocus($v) {$this->attribute_list["onfocus"] = $v;}
publicset_onkeydown ( v )[ forminput ]
Parameters
requiredv
Code
111  public function set_onkeydown($v) {$this->attribute_list["onkeydown"] = $v;}
publicset_onkeypress ( v )[ forminput ]
Parameters
requiredv
Code
108  public function set_onkeypress($v) {$this->attribute_list["onkeypress"] = $v;}
publicset_onkeyup ( v )[ forminput ]
Parameters
requiredv
Code
114  public function set_onkeyup($v) {$this->attribute_list["onkeyup"] = $v;}
publicset_onmousedown ( v )[ forminput ]
Parameters
requiredv
Code
093  public function set_onmousedown($v) {$this->attribute_list["onmousedown"] = $v;}
publicset_onmousemove ( v )[ forminput ]
Parameters
requiredv
Code
102  public function set_onmousemove($v) {$this->attribute_list["onmousemove"] = $v;}
publicset_onmouseout ( v )[ forminput ]
Parameters
requiredv
Code
105  public function set_onmouseout($v) {$this->attribute_list["onmouseout"] = $v;}
publicset_onmouseover ( v )[ forminput ]
Parameters
requiredv
Code
099  public function set_onmouseover($v) {$this->attribute_list["onmouseover"] = $v;}
publicset_onmouseup ( v )[ forminput ]
Parameters
requiredv
Code
096  public function set_onmouseup($v) {$this->attribute_list["onmouseup"] = $v;}
publicset_onselect ( v )[ forminput ]
Parameters
requiredv
Code
126  public function set_onselect($v) {$this->attribute_list["onselect"] = $v;}
publicset_style ( v )[ forminput ]
Parameters
requiredv
Code
072  public function set_style($v) {$this->attribute_list["style"] = $v;}
publicset_tabindex ( v )[ forminput ]
Parameters
requiredv
Code
132  public function set_tabindex($v) {$this->attribute_list["tabindex"] = $v;}
publicset_title ( v )[ forminput ]
Parameters
requiredv
Code
075  public function set_title($v) {$this->attribute_list["title"] = $v;}
publicset_valid ( )[ forminput ]
Parameters
No parameters for this method
Code
063  public function set_valid() {return false;}
publicset_value ( value )[ timeselect ]
Parameters
requiredvalue
Code
093  public function set_value($value)
094  {
095      if (is_array($value))
096      {
097          $this->_hour = $value["hour"];
098          $this->_minute = $value["minute"];
099          $this->_ampm = $value["ampm"];
100      }
101      else if ($this->_valid_time($value))
102      {
103          list($this->_hour,$this->_minute,$this->_ampm) = preg_split($this->_delimiter_pattern,$value);   
104      }
105      else
106      {
107          return null;
108      }
109      $military_hour = 0;
110      if (is_numeric($this->_ampm))
111      {
112          $military_hour = $this->_hour;
113          $this->_ddl_minute->value = $this->_minute;
114          if ($military_hour < 12)
115          {
116              $this->_ddl_hour->value = ($military_hour == 0) ? 12 : $military_hour;
117              $this->_ddl_ampm->value = "am";
118          }
119          else
120          {
121              $this->_ddl_hour->value = ($military_hour == 12) ? $military_hour : ($military_hour - 12);
122              $this->_ddl_ampm->value = "pm";
123          }
124      }
125      else if ($this->_ampm == "am")
126      {
127          $this->_ddl_hour->value = $this->_hour;
128          $this->_ddl_minute->value = $this->_minute;
129          $this->_ddl_ampm->value = "am";
130          $military_hour = ($this->_hour == 12) ? 0 : $this->_hour;
131      }
132      else if ($this->_ampm == "pm")
133      {
134          $this->_ddl_hour->value = $this->_hour;
135          $this->_ddl_minute->value = $this->_minute;
136          $this->_ddl_ampm->value = "pm";
137          $military_hour = ($this->_hour == 12) ? 12 : ($this->_hour + 12);
138      }
139 
140      $this->_formatted_value = "$this->_hour:$this->_minute $this->_ampm";
141      $this->_value = "$military_hour:$this->_minute:00";
142  }
publicset_xml_lang ( v )[ forminput ]
Parameters
requiredv
Code
081  public function set_xml_lang($v) {$this->attribute_list["xml:lang"] = $v;}
public__toString ( )[ forminput ]
Parameters
No parameters for this method
Code
017  public function __toString()
018  {
019      return $this->render();
020  }
private_valid_time ( time )[ timeselect ]
Parameters
requiredtime
Code
063  private function _valid_time($time)
064  {
065      if (is_array($time))
066      {
067          return (array_key_exists("hour",$time) && array_key_exists("minute",$time) && array_key_exists("ampm",$time) && count($time)==3);
068      }
069     
070      $time_parts = preg_split($this->_delimiter_pattern,$time);
071      if (count($time_parts) != 3)
072      {
073          return false;
074      }
075      $hour = $time_parts[0];
076      $minute = $time_parts[1];
077      $ampm = $time_parts[2];
078      if (is_numeric($ampm))
079      {
080          $valid_hour = ($hour>=0 && $hour<24);
081          $valid_minute = ($minute>=0 && $minute<60);
082          $valid_ampm = ($ampm>=0 && $ampm<60);
083      }
084      else
085      {
086          $valid_hour = ($hour>=1 && $hour<=12);
087          $valid_minute = ($minute>=0 && $minute<60);
088          $valid_ampm = preg_match("/am|pm/i",$ampm);
089      }
090      return ($valid_hour && $valid_minute && $valid_ampm);
091  }
 
Accessors
publicarray[ obj ]
Code
096  public function get_array()
097  {
098      return get_object_vars($this);
099  }
publicattribute_string[ element ]
Code
017  public function get_attribute_string()
018  {
019      $attributes = array();
020      foreach ($this->attributes as $k=>$v)
021      {
022          $v = preg_match("/selected|checked|readonly|disabled|multiple/i",$k) ? ($v ? $k : null) : $v;
023          $v = ($k=="style") ? $this->style_string : $v;
024          $v = (preg_match("/name/i",$k) && keyval($this->attributes,"multiple")) ? ($v . "[]") : $v;
025          if (is_null($v))
026          {
027              continue;
028          }
029          $attributes[] = $k . "=\"" . ent($v) . "\"";
030      }
031      return implode(" ",$attributes);
032  }
publicclassname[ forminput ]
Code
068  public function get_classname() {return keyval($this->attribute_list,"class");}
Code
069  public function set_classname($v) {$this->attribute_list["class"] = $v;}
publicdirection[ forminput ]
Code
083  public function get_direction() {return keyval($this->attribute_list,"dir");}
Code
084  public function set_direction($v) {$this->attribute_list["dir"] = $v;}
publicdirty[ obj ]
Code
063  public function get_dirty()
064  {
065      if ($this->id === 0)
066      {
067          $this->_dirty = true;
068      }
069      else
070      {
071          foreach (get_object_vars($this) as $k=>$v)
072          {
073              if ($this->_dirty)
074              {
075                  break;
076              }
077              if (preg_match('/_dirty$/',$k))
078              {
079                  $this->_dirty = $this->_dirty || $v;
080              }
081          }
082      }
083      return $this->_dirty;
084  }
publicdisabled[ forminput ]
Code
128  public function get_disabled() {return keyval($this->attribute_list,"disabled");}
Code
129  public function set_disabled($v) {$this->attribute_list["disabled"] = $v;}
publicid[ forminput ]
Code
065  public function get_id() {return keyval($this->attribute_list,"id");}
Code
066  public function set_id($v) {$this->attribute_list["id"] = $v;}
publicjson[ obj ]
Code
101  public function get_json()
102  {
103      $class = new ReflectionClass($this->classname);
104      $methods = $class->getMethods();
105      usort($methods,"sort_reflection_objects");
106      $accessors = array();
107      foreach ($methods as $index=>$method)
108      {
109          $declarer = $method->getDeclaringClass()->name;
110          if (preg_match('/^(get|set|)_(.+)$/',$method->name,$matches))
111          {
112              $accessor = $matches[2];
113              $getset = $matches[1];
114              eval("\$accessors[\$accessor] = \$this->".$accessor.";");
115          }
116      }
117      //return json_encode($this->get_array());
118      return json_encode($accessors);
119  }
publiclang[ forminput ]
Code
077  public function get_lang() {return keyval($this->attribute_list,"lang");}
Code
078  public function set_lang($v) {$this->attribute_list["lang"] = $v;}
publicname[ forminput ]
Code
134  public function get_name() {return keyval($this->attribute_list,"name");}
Code
135  public function set_name($v) {$this->attribute_list["name"] = $v;}
publiconblur[ forminput ]
Code
119  public function get_onblur() {return keyval($this->attribute_list,"onblur");}
Code
120  public function set_onblur($v) {$this->attribute_list["onblur"] = $v;}
publiconchange[ forminput ]
Code
122  public function get_onchange() {return keyval($this->attribute_list,"onchange");}
Code
123  public function set_onchange($v) {$this->attribute_list["onchange"] = $v;}
publiconclick[ forminput ]
Code
086  public function get_onclick() {return keyval($this->attribute_list,"onclick");}
Code
087  public function set_onclick($v) {$this->attribute_list["onclick"] = $v;}
publicondblclick[ forminput ]
Code
089  public function get_ondblclick() {return keyval($this->attribute_list,"ondblclick");}
Code
090  public function set_ondblclick($v) {$this->attribute_list["ondblclick"] = $v;}
publiconfocus[ forminput ]
Code
116  public function get_onfocus() {return keyval($this->attribute_list,"onfocus");}
Code
117  public function set_onfocus($v) {$this->attribute_list["onfocus"] = $v;}
publiconkeydown[ forminput ]
Code
110  public function get_onkeydown() {return keyval($this->attribute_list,"onkeydown");}
Code
111  public function set_onkeydown($v) {$this->attribute_list["onkeydown"] = $v;}
publiconkeypress[ forminput ]
Code
107  public function get_onkeypress() {return keyval($this->attribute_list,"onkeypress");}
Code
108  public function set_onkeypress($v) {$this->attribute_list["onkeypress"] = $v;}
publiconkeyup[ forminput ]
Code
113  public function get_onkeyup() {return keyval($this->attribute_list,"onkeyup");}
Code
114  public function set_onkeyup($v) {$this->attribute_list["onkeyup"] = $v;}
publiconmousedown[ forminput ]
Code
092  public function get_onmousedown() {return keyval($this->attribute_list,"onmousedown");}
Code
093  public function set_onmousedown($v) {$this->attribute_list["onmousedown"] = $v;}
publiconmousemove[ forminput ]
Code
101  public function get_onmousemove() {return keyval($this->attribute_list,"onmousemove");}
Code
102  public function set_onmousemove($v) {$this->attribute_list["onmousemove"] = $v;}
publiconmouseout[ forminput ]
Code
104  public function get_onmouseout() {return keyval($this->attribute_list,"onmouseout");}
Code
105  public function set_onmouseout($v) {$this->attribute_list["onmouseout"] = $v;}
publiconmouseover[ forminput ]
Code
098  public function get_onmouseover() {return keyval($this->attribute_list,"onmouseover");}
Code
099  public function set_onmouseover($v) {$this->attribute_list["onmouseover"] = $v;}
publiconmouseup[ forminput ]
Code
095  public function get_onmouseup() {return keyval($this->attribute_list,"onmouseup");}
Code
096  public function set_onmouseup($v) {$this->attribute_list["onmouseup"] = $v;}
publiconselect[ forminput ]
Code
125  public function get_onselect() {return keyval($this->attribute_list,"onselect");}
Code
126  public function set_onselect($v) {$this->attribute_list["onselect"] = $v;}
publicproperties[ obj ]
Code
121  public function get_properties()
122  {
123      return array_keys($this->array);
124  }
publicstring[ obj ]
Code
091  protected function get_string()
092  {
093      return method_exists($this,"__toString") ? $this->__toString() : null;
094  }
publicstyle[ forminput ]
Code
071  public function get_style() {return keyval($this->attribute_list,"style");}
Code
072  public function set_style($v) {$this->attribute_list["style"] = $v;}
publicstyle_string[ element ]
Code
034  public function get_style_string()
035  {
036      $styles = array();
037  //        foreach ($this->style as $k=>$v)
038  //        {
039  //            $styles[] = "$k:$v;";
040  //        }
041  //        $this->attributes["style"] .= implode("",$styles);
042      if (is_null(keyval($this->attributes,"style")))
043      {
044          return null;
045      }
046      else
047      {
048          return $this->attributes["style"];
049      }
050  }
publictabindex[ forminput ]
Code
131  public function get_tabindex() {return keyval($this->attribute_list,"tabindex");}
Code
132  public function set_tabindex($v) {$this->attribute_list["tabindex"] = $v;}
publictitle[ forminput ]
Code
074  public function get_title() {return keyval($this->attribute_list,"title");}
Code
075  public function set_title($v) {$this->attribute_list["title"] = $v;}
publicvalid[ forminput ]
Code
062  public function get_valid() {return $this->validation->validate($this->name,$this->value);}
Code
063  public function set_valid() {return false;}
publicvalue[ timeselect ]
Code
144  public function get_value()
145  {
146      return $this->_value;
147  }
Code
093  public function set_value($value)
094  {
095      if (is_array($value))
096      {
097          $this->_hour = $value["hour"];
098          $this->_minute = $value["minute"];
099          $this->_ampm = $value["ampm"];
100      }
101      else if ($this->_valid_time($value))
102      {
103          list($this->_hour,$this->_minute,$this->_ampm) = preg_split($this->_delimiter_pattern,$value);   
104      }
105      else
106      {
107          return null;
108      }
109      $military_hour = 0;
110      if (is_numeric($this->_ampm))
111      {
112          $military_hour = $this->_hour;
113          $this->_ddl_minute->value = $this->_minute;
114          if ($military_hour < 12)
115          {
116              $this->_ddl_hour->value = ($military_hour == 0) ? 12 : $military_hour;
117              $this->_ddl_ampm->value = "am";
118          }
119          else
120          {
121              $this->_ddl_hour->value = ($military_hour == 12) ? $military_hour : ($military_hour - 12);
122              $this->_ddl_ampm->value = "pm";
123          }
124      }
125      else if ($this->_ampm == "am")
126      {
127          $this->_ddl_hour->value = $this->_hour;
128          $this->_ddl_minute->value = $this->_minute;
129          $this->_ddl_ampm->value = "am";
130          $military_hour = ($this->_hour == 12) ? 0 : $this->_hour;
131      }
132      else if ($this->_ampm == "pm")
133      {
134          $this->_ddl_hour->value = $this->_hour;
135          $this->_ddl_minute->value = $this->_minute;
136          $this->_ddl_ampm->value = "pm";
137          $military_hour = ($this->_hour == 12) ? 12 : ($this->_hour + 12);
138      }
139 
140      $this->_formatted_value = "$this->_hour:$this->_minute $this->_ampm";
141      $this->_value = "$military_hour:$this->_minute:00";
142  }
publicxml_lang[ forminput ]
Code
080  public function get_xml_lang() {return keyval($this->attribute_list,"xml:lang");}
Code
081  public function set_xml_lang($v) {$this->attribute_list["xml:lang"] = $v;}
Get Helix PHP Framework at SourceForge.net. Fast, secure and Free Open Source software downloads