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


PHP TRecord::load方法代码示例

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


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

示例1: load

 public function load($id)
 {
     //sobrescrito!
     //load da agregação com turma no get_alunos !!!!!!!
     //load da agregação com turma no get_disciplinas !!!!!!!
     $anoLetivo = new AnoLetivo($this->anoletivo_id);
     return parent::load($id);
 }
开发者ID:joaopaulo11jp,项目名称:educaproject,代码行数:8,代码来源:Turma.class.php

示例2: load

 /**
  * Load the object and its aggregates
  * @param $id object ID
  */
 public function load($id)
 {
     // load the related Contact objects
     $repository = new TRepository('Contact');
     $criteria = new TCriteria();
     $criteria->add(new TFilter('customer_id', '=', $id));
     $this->contacts = $repository->load($criteria);
     // load the object itself
     return parent::load($id);
 }
开发者ID:jfrank1500,项目名称:curso_php,代码行数:14,代码来源:Composition.php

示例3: load

 public function load($id)
 {
     $repository = new TRepository('ImovelProprietarios');
     $criteria = new TCriteria();
     $criteria->add(new TFilter('tb_imovel_imovel_id', '=', $id));
     $imovelproprietario = $repository->load($criteria);
     if ($imovelproprietario) {
         foreach ($imovelproprietario as $imovelproprietarios) {
             $proprietario = new Contribuinte($imovelproprietarios->tb_contribuinte_contribuinte_id);
             $this->addProprietario($proprietario);
         }
     }
     return parent::load($id);
 }
开发者ID:eduardojsouza,项目名称:liger,代码行数:14,代码来源:Imovel.class.php

示例4: load

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

示例5: load

 /**
  * Load the object and its aggregates
  * @param $id object ID
  */
 public function load($id)
 {
     // load the related System_program objects
     $repository = new TRepository('SystemGroupProgram');
     $criteria = new TCriteria();
     $criteria->add(new TFilter('system_group_id', '=', $id));
     $system_group_system_programs = $repository->load($criteria);
     if ($system_group_system_programs) {
         foreach ($system_group_system_programs as $system_group_system_program) {
             $system_program = new SystemProgram($system_group_system_program->system_program_id);
             $this->addSystemProgram($system_program);
         }
     }
     // load the object itself
     return parent::load($id);
 }
开发者ID:jfrank1500,项目名称:curso_php,代码行数:20,代码来源:SystemGroup.class.php

示例6: load

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

示例7: load

 /**
  * Load the object and its aggregates
  * @param $id object ID
  */
 public function load($id)
 {
     // load the related Item objects
     $repository = new TRepository('Item');
     $criteria = new TCriteria();
     $criteria->add(new TFilter('srp_id', '=', $id));
     $this->items = $repository->load($criteria);
     // load the object itself
     return parent::load($id);
 }
开发者ID:andermall,项目名称:tcc,代码行数:14,代码来源:Srp.class.php

示例8: load

 /**
  * Load the object and its aggregates
  * @param $id object ID
  */
 public function load($id)
 {
     $this->skills = parent::loadAggregate('Skill', 'CustomerSkill', 'customer_id', 'skill_id', $id);
     $this->contacts = parent::loadComposite('Contact', 'customer_id', $id);
     // load the object itself
     return parent::load($id);
 }
开发者ID:jfrank1500,项目名称:curso_php,代码行数:11,代码来源:Customer.class.php

示例9: load

 /**
  * Load the object and the aggregates
  */
 public function load($id)
 {
     $book_author_rep = new TRepository('BookAuthor');
     $book_subject_rep = new TRepository('BookSubject');
     $item_rep = new TRepository('Item');
     $criteria = new TCriteria();
     $criteria->add(new TFilter('book_id', '=', $id));
     // load the Author aggregates
     $book_authors = $book_author_rep->load($criteria);
     if ($book_authors) {
         foreach ($book_authors as $book_author) {
             $author = new Author($book_author->author_id);
             $this->addAuthor($author);
         }
     }
     // load the Subject aggregates
     $book_subjects = $book_subject_rep->load($criteria);
     if ($book_subjects) {
         foreach ($book_subjects as $book_subject) {
             $subject = new Subject($book_subject->subject_id);
             $this->addSubject($subject);
         }
     }
     // load the Item composition
     $items = $item_rep->load($criteria);
     if ($items) {
         foreach ($items as $item) {
             $this->addItem($item);
         }
     }
     // load the object itself
     return parent::load($id);
 }
开发者ID:jhonleandres,项目名称:crmbf,代码行数:36,代码来源:Book.class.php

示例10: onBeforeStore

 public function onBeforeStore($object)
 {
     $this->lastState = array();
     if (self::exists($object->id)) {
         $this->lastState = parent::load($object->id)->toArray();
     }
     // file_put_contents('/tmp/log.txt', "Before Store ".print_r($object, TRUE), FILE_APPEND);
 }
开发者ID:jhonleandres,项目名称:Atividades,代码行数:8,代码来源:Ticket.class.php

示例11: load

 /**
  * Load the object and its aggregates
  * @param $id object ID
  */
 public function load($id)
 {
     $this->produtoss = parent::loadAggregate('Produtos', 'PedidosProdutos', 'pedidos_id', 'produtos_id', $id);
     // load the object itself
     return parent::load($id);
 }
开发者ID:jhonleandres,项目名称:pecommerce,代码行数:10,代码来源:Pedidos.class.php

示例12: load

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

示例13: load

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

示例14: load

 /**
  * Load the object and the aggregates
  */
 public function load($id)
 {
     $member_project_rep = new TRepository('MemberProject');
     $criteria = new TCriteria();
     $criteria->add(new TFilter('id_member', '=', $id));
     // load the aggregates
     $member_projects = $member_project_rep->load($criteria);
     if ($member_projects) {
         foreach ($member_projects as $member_project) {
             $project = new Project($member_project->id_project);
             $this->addProject($project);
         }
     }
     // load the object itself
     return parent::load($id);
 }
开发者ID:jfrank1500,项目名称:curso_php,代码行数:19,代码来源:Member.class.php

示例15: load

 /**
  * Load the object and its aggregates
  * @param $id object ID
  */
 public function load($id)
 {
     $this->contacts = parent::loadComposite('Contact', 'customer_id', $id);
     // load the object itself
     return parent::load($id);
 }
开发者ID:jfrank1500,项目名称:curso_php,代码行数:10,代码来源:CompositionSimple.php


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