當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。