Guest User

Untitled

a guest
Apr 17th, 2018
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1. <?php
  2. /**
  3. * System_aluno_turma Active Record
  4. * @author <Jonathas Alves Santos>
  5. */
  6. class SystemAlunoParcela extends TRecord
  7. {
  8. const TABLENAME = 'system_aluno_parcela';
  9. const PRIMARYKEY= 'id';
  10. const IDPOLICY = 'max'; // {max, serial}
  11.  
  12. private $system_aluno;
  13.  
  14. /**
  15. * Returns the Item from its numero_documento
  16. */
  17. public static function newFromNumeroDocumento($numero_documento)
  18. {
  19. $rep = new TRepository('SystemAlunoParcela');
  20. $criteria = new TCriteria;
  21. $criteria->add(new TFilter('numero_documento', '=', $numero_documento));
  22. $objects = $rep->load($criteria);
  23. if ($objects)
  24. {
  25. $detail = $objects[0];
  26. return $detail;
  27. }
  28. }
  29. }
Add Comment
Please, Sign In to add comment