本文整理汇总了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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例12: load
public function load($id)
{
//$this->enderecos = parent::loadComposite('endereco','idpessoa');
$this->contatos = parent::loadComposite('contato', 'idpessoa', $id);
return parent::load($id);
}
示例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);
}
示例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);
}
示例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);
}