PageRenderTime 42ms CodeModel.GetById 20ms RepoModel.GetById 0ms app.codeStats 0ms

/core/xpdo/om/sqlite/xpdoobject.class.php

https://github.com/esche/revolution
PHP | 73 lines | 42 code | 2 blank | 29 comment | 1 complexity | a53df949b9307a4c575c385c1e7622b0 MD5 | raw file
  1. <?php
  2. /*
  3. * Copyright 2006-2010 by Jason Coward <xpdo@opengeek.com>
  4. *
  5. * This file is part of xPDO.
  6. *
  7. * xPDO is free software; you can redistribute it and/or modify it under the
  8. * terms of the GNU General Public License as published by the Free Software
  9. * Foundation; either version 2 of the License, or (at your option) any later
  10. * version.
  11. *
  12. * xPDO is distributed in the hope that it will be useful, but WITHOUT ANY
  13. * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
  14. * A PARTICULAR PURPOSE. See the GNU General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU General Public License along with
  17. * xPDO; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
  18. * Suite 330, Boston, MA 02111-1307 USA
  19. */
  20. /**
  21. * Contains a derivative of the xPDOObject class for SQLite.
  22. *
  23. * This file contains the base persistent object classes for SQLite, which your
  24. * user-defined classes will extend when implementing an xPDO object model
  25. * targeted at the SQLite platform.
  26. *
  27. * @package xpdo
  28. * @subpackage om.sqlite
  29. */
  30. if (!class_exists('xPDOObject')) {
  31. /** Include the parent {@link xPDOObject} class. */
  32. include_once (strtr(realpath(dirname(__FILE__)), '\\', '/') . '/../xpdoobject.class.php');
  33. }
  34. /**
  35. * Implements extensions to the base xPDOObject class for SQLite.
  36. *
  37. * {@inheritdoc}
  38. *
  39. * @package xpdo
  40. * @subpackage om.sqlite
  41. */
  42. class xPDOObject_sqlite extends xPDOObject {
  43. public $_currentTimestamps= array(
  44. "CURRENT_TIMESTAMP"
  45. );
  46. public $_currentDates= array(
  47. "CURRENT_DATE"
  48. );
  49. public $_currentTimes= array(
  50. "CURRENT_TIME"
  51. );
  52. }
  53. /**
  54. * Extend this abstract class to define a class having an integer primary key.
  55. *
  56. * @package xpdo
  57. * @subpackage om.sqlite
  58. */
  59. class xPDOSimpleObject_sqlite extends xPDOSimpleObject {
  60. public $_currentTimestamps= array(
  61. "CURRENT_TIMESTAMP"
  62. );
  63. public $_currentDates= array(
  64. "CURRENT_DATE"
  65. );
  66. public $_currentTimes= array(
  67. "CURRENT_TIME"
  68. );
  69. }