当前位置: 首页>>代码示例>>PHP>>正文


PHP TRecord::store方法代码示例

本文整理汇总了PHP中TRecord::store方法的典型用法代码示例。如果您正苦于以下问题:PHP TRecord::store方法的具体用法?PHP TRecord::store怎么用?PHP TRecord::store使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在TRecord的用法示例。


在下文中一共展示了TRecord::store方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: store

 public function store()
 {
     //sobrescrito!
     parent::store();
     parent::saveAggregate('AlunoTurma', 'turma_id', 'matricula_aluno', $this->id, $this->alunos);
     parent::saveAggregate('TurmaDisciplina', 'turma_id', 'disciplina_id', $this->id, $this->disciplinas);
 }
开发者ID:joaopaulo11jp,项目名称:educaproject,代码行数:7,代码来源:Turma.class.php

示例2: store

 public function store()
 {
     // armazena a venda
     parent::store();
     // percorre os itens da venda
     foreach ($this->itens as $item) {
         $item->id_venda = $this->id;
         // armazena o item
         $item->store();
     }
 }
开发者ID:ricardohenriq,项目名称:learn-php,代码行数:11,代码来源:Venda.class.php

示例3: store

 public function store()
 {
     parent::store();
     $criteria = new TCriteria();
     $criteria->add(new TFilter('tb_imovel_imovel_id', '=', $this->imovel_id));
     $repository = new TRepository('ImovelProprietarios');
     $repository->delete($criteria);
     if ($this->proprietarios) {
         foreach ($this->proprietarios as $proprietario) {
             $imovelproprietarios = new ImovelProprietarios();
             $imovelproprietarios->tb_contribuinte_contribuinte_id = $proprietario->proprietarios_id;
             $imovelproprietarios->tb_imovel_imovel_id = $this->imovel_id;
             $imovelproprietarios->store();
         }
     }
 }
开发者ID:eduardojsouza,项目名称:liger,代码行数:16,代码来源:Imovel.class.php

示例4: store

 public function store()
 {
     // store the object itself
     parent::store();
     $criteria = new TCriteria();
     $criteria->add(new TFilter('tb_logradouros_logra_id', '=', $this->logra_id));
     $repository = new TRepository('LogradouroBairro');
     $repository->delete($criteria);
     if ($this->bairros) {
         foreach ($this->bairros as $bairro) {
             $logradourobairros = new LogradouroBairro();
             $logradourobairros->tb_bairros_bairros_id = $bairro->bairros_id;
             $logradourobairros->tb_logradouros_logra_id = $this->logra_id;
             $logradourobairros->store();
         }
     }
 }
开发者ID:eduardojsouza,项目名称:liger,代码行数:17,代码来源:Logradouro.class.php

示例5: store

 /**
  * Store the object and its aggregates
  */
 public function store()
 {
     // store the object itself
     parent::store();
     // delete the related Contact objects
     $criteria = new TCriteria();
     $criteria->add(new TFilter('customer_id', '=', $this->id));
     $repository = new TRepository('Contact');
     $repository->delete($criteria);
     // store the related Contact objects
     if ($this->contacts) {
         foreach ($this->contacts as $contact) {
             unset($contact->id);
             $contact->customer_id = $this->id;
             $contact->store();
         }
     }
 }
开发者ID:jfrank1500,项目名称:curso_php,代码行数:21,代码来源:Composition.php

示例6: store

 /**
  * Store the object and its aggregates
  */
 public function store()
 {
     // store the object itself
     parent::store();
     // delete the related System_groupSystem_program objects
     $criteria = new TCriteria();
     $criteria->add(new TFilter('system_group_id', '=', $this->id));
     $repository = new TRepository('SystemGroupProgram');
     $repository->delete($criteria);
     // store the related System_groupSystem_program objects
     if ($this->system_programs) {
         foreach ($this->system_programs as $system_program) {
             $system_group_system_program = new SystemGroupProgram();
             $system_group_system_program->system_program_id = $system_program->id;
             $system_group_system_program->system_group_id = $this->id;
             $system_group_system_program->store();
         }
     }
 }
开发者ID:jfrank1500,项目名称:curso_php,代码行数:22,代码来源:SystemGroup.class.php

示例7: store

 /**
  * Store the object and its aggregates
  */
 public function store()
 {
     // store the object itself
     parent::store();
     // delete the related CustomerSkill objects
     $criteria = new TCriteria();
     $criteria->add(new TFilter('customer_id', '=', $this->id));
     $repository = new TRepository('CustomerSkill');
     $repository->delete($criteria);
     // store the related CustomerSkill objects
     if ($this->skills) {
         foreach ($this->skills as $skill) {
             $customer_skill = new CustomerSkill();
             $customer_skill->skill_id = $skill->id;
             $customer_skill->customer_id = $this->id;
             $customer_skill->store();
         }
     }
 }
开发者ID:jfrank1500,项目名称:curso_php,代码行数:22,代码来源:Aggregation.php

示例8: store

 /**
  * Store the object and its aggregates
  */
 public function store()
 {
     // store the object itself
     parent::store();
     // delete the related Item objects
     $criteria = new TCriteria();
     $criteria->add(new TFilter('srp_id', '=', $this->id));
     $repository = new TRepository('Item');
     $repository->delete($criteria);
     // store the related Item objects
     if ($this->items) {
         foreach ($this->items as $item) {
             unset($item->id);
             $item->srp_id = $this->id;
             $item->store();
         }
     }
 }
开发者ID:andermall,项目名称:tcc,代码行数:21,代码来源:Srp.class.php

示例9: store

 /**
  * Store the object and its aggregates
  */
 public function store()
 {
     // store the object itself
     parent::store();
     parent::saveAggregate('CustomerSkill', 'customer_id', 'skill_id', $this->id, $this->skills);
     parent::saveComposite('Contact', 'customer_id', $this->id, $this->contacts);
 }
开发者ID:jfrank1500,项目名称:curso_php,代码行数:10,代码来源:Customer.class.php

示例10: store

 /**
  * Stores the book and the aggregates (authors, subjects, items)
  */
 public function store()
 {
     // stores the Book
     parent::store();
     // delete the aggregates
     $criteria = new TCriteria();
     $criteria->add(new TFilter('book_id', '=', $this->id));
     $repository = new TRepository('BookAuthor');
     $repository->delete($criteria);
     $repository = new TRepository('BookSubject');
     $repository->delete($criteria);
     $repository = new TRepository('Item');
     $repository->delete($criteria);
     // store the authors
     if ($this->authors) {
         foreach ($this->authors as $author) {
             $book_author = new BookAuthor();
             $book_author->book_id = $this->id;
             $book_author->author_id = $author->id;
             $book_author->store();
         }
     }
     // store the subjects
     if ($this->subjects) {
         foreach ($this->subjects as $subject) {
             $book_subject = new BookSubject();
             $book_subject->book_id = $this->id;
             $book_subject->subject_id = $subject->id;
             $book_subject->store();
         }
     }
     // store the items
     if ($this->items) {
         foreach ($this->items as $item) {
             $item->book_id = $this->id;
             $item->store();
         }
     }
 }
开发者ID:jhonleandres,项目名称:crmbf,代码行数:42,代码来源:Book.class.php

示例11: store

 public function store()
 {
     parent::store();
     //parent::saveComposite('endereco','idpessoa',$this->idpessoa,$this->enderecos);
     parent::saveComposite('contato', 'idpessoa', $this->idpessoa, $this->contatos);
 }
开发者ID:edurbs,项目名称:sobcontrole,代码行数:6,代码来源:pessoa.class.php

示例12: store

 /**
  * Store the object and its aggregates
  */
 public function store()
 {
     // store the object itself
     parent::store();
     parent::saveAggregate('PedidosProdutos', 'pedidos_id', 'produtos_id', $this->id, $this->produtoss);
 }
开发者ID:jhonleandres,项目名称:pecommerce,代码行数:9,代码来源:Pedidos.class.php

示例13: store

 /**
  * Stores the book and the aggregates (authors, subjects, items)
  */
 public function store()
 {
     // stores the Book
     parent::store();
     // delete the aggregates
     $criteria = new TCriteria();
     $criteria->add(new TFilter('book_id', '=', $this->id));
     $repository = new TRepository('BookAuthor');
     $repository->delete($criteria);
     $repository = new TRepository('BookSubject');
     $repository->delete($criteria);
     // collect persistent item ids
     if ($this->items) {
         foreach ($this->items as $item) {
             if ($item->id) {
                 $item_ids[] = $item->id;
             }
         }
     }
     // delete all items, except for those that persist
     $criteria->add(new TFilter('id', 'NOT IN', $item_ids));
     $repository = new TRepository('Item');
     $repository->delete($criteria);
     // store the authors
     if ($this->authors) {
         foreach ($this->authors as $author) {
             $book_author = new BookAuthor();
             $book_author->book_id = $this->id;
             $book_author->author_id = $author->id;
             $book_author->store();
         }
     }
     // store the subjects
     if ($this->subjects) {
         foreach ($this->subjects as $subject) {
             $book_subject = new BookSubject();
             $book_subject->book_id = $this->id;
             $book_subject->subject_id = $subject->id;
             $book_subject->store();
         }
     }
     // store the items
     if ($this->items) {
         foreach ($this->items as $item) {
             $item->book_id = $this->id;
             $item->store();
         }
     }
 }
开发者ID:jfrank1500,项目名称:curso_php,代码行数:52,代码来源:Book.class.php

示例14: store

 /**
  * Store the object and its aggregates
  */
 public function store()
 {
     // store the object itself
     parent::store();
     // delete the related ItemCessao objects
     $criteria = new TCriteria();
     $criteria->add(new TFilter('cessao_id', '=', $this->id));
     $repository = new TRepository('ItemCessao');
     $repository->delete($criteria);
     // store the related ItemCessao objects
     if ($this->items) {
         foreach ($this->items as $item) {
             $cessao_item = new ItemCessao();
             $cessao_item->item_id = $item->id;
             $cessao_item->cessao_id = $this->id;
             $cessao_item->quantidade = $item->quantidade;
             $cessao_item->store();
         }
     }
 }
开发者ID:andermall,项目名称:tcc,代码行数:23,代码来源:Cessao.class.php

示例15: store

 /**
  * Store the object and its aggregates
  */
 public function store()
 {
     // store the object itself
     parent::store();
     // delete the related ItemRequisicao objects
     $criteria = new TCriteria();
     $criteria->add(new TFilter('requisicao_id', '=', $this->id));
     $repository = new TRepository('ItemRequisicao');
     $repository->delete($criteria);
     // store the related ItemRequisicao objects
     if ($this->items) {
         foreach ($this->items as $item) {
             $requisicao_item = new ItemRequisicao();
             $requisicao_item->item_id = $item->id;
             $requisicao_item->requisicao_id = $this->id;
             $requisicao_item->justificativa = $item->justificativa;
             $requisicao_item->quantidade = $item->quantidade;
             $requisicao_item->prazoEntrega = $item->prazoEntrega;
             $requisicao_item->store();
         }
     }
 }
开发者ID:andermall,项目名称:tcc,代码行数:25,代码来源:Requisicao.class.php


注:本文中的TRecord::store方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。