DbAsyncTrait.php 423 B

123456789101112131415161718192021222324
  1. <?php
  2. namespace controllers\utils;
  3. use Ubiquity\orm\core\prepared\DAOPreparedQueryById;
  4. trait DbAsyncTrait {
  5. /**
  6. *
  7. * @var DAOPreparedQueryById
  8. */
  9. protected static $pDao;
  10. public function __construct() {}
  11. public function initialize() {
  12. \Ubiquity\utils\http\UResponse::setContentType('application/json');
  13. }
  14. public static function warmup() {
  15. self::$pDao = new DAOPreparedQueryById('models\\World');
  16. }
  17. }