Ejemplo n.º 1
0
 public function setProperties($properties)
 {
     if (empty($properties)) {
         return;
     }
     while (list($key, $value) = each($properties)) {
         if (is_valid_prop($key)) {
             $this->{$key} = $value;
         }
     }
 }
Ejemplo n.º 2
0
 /**
  * Assignment occurs only on properties
  * of this which are not already set
  *
  * @param array $properties property => value pairs
  */
 public function setProperties($properties)
 {
     if (!is_array($properties)) {
         $properties = array($properties);
     }
     while (list($name, $value) = each($properties)) {
         if (!is_valid_prop($name)) {
             error_log("'{$name}' is an invalid property name when building form.");
             continue;
         }
         // ignore it if it was already set
         if (!isset($this->{$name})) {
             $this->{$name} = $value;
         }
     }
 }
Ejemplo n.º 3
0
 /**
  * This function should only be called internally as it 
  * bypasses any filtering. Assignment occurs only on properties
  * of this which are not already set
  *
  * @param array $properties property => value pairs
  */
 public function _setProperties($properties)
 {
     while (list($name, $value) = each($properties)) {
         // ignore it if it was already set
         if (is_valid_prop($name)) {
             $this->{$name} = $value;
         }
     }
 }