Ejemplo n.º 1
0
 /**
  * getInstance 
  * 
  * @return KVDdom_TestSessie
  */
 public static function getInstance()
 {
     if (self::$instance === null) {
         self::$instance = new KVDdom_TestSessie();
     }
     return self::$instance;
 }
 public function setUp()
 {
     $sessie = KVDdom_TestSessie::getInstance();
     if (!KVDdom_TestSessie::isInitialized()) {
         $sessie->initialize(array('dataMapperDirs' => array(), 'dataMapperParameters' => array()));
     }
     $ouders = new KVDdom_EditeerbareDomainObjectCollection(array(), 'KVDdom_TestChangeableDomainObject');
     $data = array('naam' => 'Van Daele', 'voornaam' => 'Koen', 'ouders' => $ouders);
     $this->do = new KVDdom_TestChangeableDomainObject(1, $sessie, $data);
     $ouders = new KVDdom_EditeerbareDomainObjectCollection(array(), 'KVDdom_TestChangeableDomainObject');
     $data = array('naam' => 'Van Daele', 'voornaam' => 'Henk', 'ouders' => $ouders);
     $this->vader = new KVDdom_TestChangeableDomainObject(2, $sessie, $data);
     $ouders = new KVDdom_EditeerbareDomainObjectCollection(array(), 'KVDdom_TestChangeableDomainObject');
     $data = array('naam' => 'Janssens', 'voornaam' => 'Patricia', 'ouders' => $ouders);
     $this->moeder = new KVDdom_TestChangeableDomainObject(3, $sessie, $data);
     $ouders = new KVDdom_EditeerbareDomainObjectCollection(array(2 => $this->vader, 3 => $this->moeder), 'KVDdom_TestChangeableDomainObject');
     $data = array('naam' => 'Van Daele', 'voornaam' => 'Annelies', 'ouders' => $ouders);
     $this->annelies = new KVDdom_TestChangeableDomainObject(4, $sessie, $data);
 }