Beispiel #1
0
 /**
  * Print the object for debugging purposes.
  */
 function trace()
 {
     $rv = 'Atsumi(' . get_class($this) . ") {";
     $ik = $this->getIndexKeys();
     if (!is_null($ik)) {
         $ao = new AtsumiObject($this->getCore());
         foreach ($ik as $index) {
             $rv .= "\n  {$index} -> " . $ao->get($index);
         }
     }
     $rv .= "\n}\n";
     return $rv;
 }
Beispiel #2
0
 /**
  * Change data in the change set.
  */
 function setref(&$value, $index = NULL)
 {
     if (!is_null($index) && parent::get($index) == $value) {
         if (!is_null($this->changeset) && array_key_exists($index, $this->changeset)) {
             unset($this->changeset[$index]);
         }
     } else {
         if (is_null($index)) {
             parent::setref($value);
         } else {
             if (is_null($this->changeset)) {
                 // initialize change set
                 $this->changeset = array();
                 $core =& $this->getCore();
                 if (!is_array($core) && !is_object($core)) {
                     $nucore = array();
                     foreach ($this->storage_method->getPrimaryKeys() as $pk) {
                         $nucore[$pk] =& $core;
                     }
                     parent::setref($nucore);
                 }
             }
             $this->changeset[$index] =& $value;
         }
     }
 }