예제 #1
0
 public function addParent(Parents $parent)
 {
     $parent->save();
     $this->parents[] = $parent;
     $mapper = DbSingleton::getParentChildrenMapper();
     $mapper->addRelation($parent, $this);
 }
예제 #2
0
 public function addChildren(Children $children)
 {
     $children->save();
     $this->childrens[] = $children;
     $mapper = DbSingleton::getParentChildrenMapper();
     $mapper->addRelation($this, $children);
 }