Exemplo n.º 1
0
 private function convertdata($data)
 {
     $this->data = null;
     if (is_null($data)) {
         return;
     } else {
         $this->copyValueToKey($data);
         // first copys in all the data that has one to one relation
         foreach ($this->propertyTable as $key => &$obj) {
             //then copy the logical properties over
             $value = null;
             $datafieldname = $this->getDatafieldname($key);
             if (is_null($datafieldname) == false) {
                 $value = $data->{$datafieldname};
             }
             if ($obj->logicdefined == true) {
                 if ($key == 'boek') {
                     $book = new boek(null);
                     $booktoget = intval($data->boekid);
                     $book->retrieveByID($booktoget);
                     $this->data->{$key} = $book;
                     //   $this->valtodata($key,false);
                 } else {
                     $msg = 'objectfield \'' . $key . '\' should be logicdefined while no definition in objectDef ' . '<br/>';
                     Logger::log($msg);
                     die;
                 }
             }
         }
         unset($obj);
     }
 }
Exemplo n.º 2
0
        echo 'create niet gedaan want emailbestaat al <br>';
    }
    else {
        echo 'Nieuw account gemaakt ';
        $klant->ZetLeverAdres('testadres straatnr gemeente');
        echo "even testen in het <br>";
         echo $klant->__toString();                         
    }
*/
?>
                 
               <h1>Opvragenboek - </h1>
		<?
 
                $bookServ = new BoekService;
                $book = new boek();    
                $book->titel='Nieuwboek';
                $book->setIsbn('0123-1235455');
                $book->setPrice(15.89);
                $book->setUitgever('DeUitgever');
                $book->setAuteur('auteur');
                $book->InitChanged();
                $book = $bookServ->GetDao()->save($book);// new book object saved

                
                
                    
                $book = $bookServ->GetbookByISBN("978-1935182320");   
                $book2 = $book;
                
                 /*