コード例 #1
0
ファイル: Edge.php プロジェクト: frdl/webfan
 public function create()
 {
     $L = new Label();
     if (!$L->find($this->label)) {
         $L->label = $this->label;
         $L->create();
     }
     return parent::create();
 }
コード例 #2
0
ファイル: Project.php プロジェクト: frdl/webfan
 public function create()
 {
     if (!isset($this->node_parent)) {
         $this->node_parent = 0;
     }
     if (!isset($this->node_root)) {
         $this->node_root = 0;
     }
     $N = new Node();
     $N->id_parent = $this->node_parent;
     $N->id_root = $this->node_root;
     $N->table_alias = self::ALIAS;
     $N->create();
     $this->variables[$this->pk] = $N->db()->lastInsertId();
     return parent::create();
 }