示例#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();
 }