MockBase.php 601 B

12345678910111213141516171819202122232425262728
  1. <?php
  2. /**
  3. * Lithium: the most rad php framework
  4. *
  5. * @copyright Copyright 2013, Union of RAD(http://union-of-rad.org)
  6. * @license http://opensource.org/licenses/bsd-license.php The BSD License
  7. */
  8. namespace lithium\tests\mocks\data;
  9. use lithium\tests\mocks\data\model\MockDatabase;
  10. class MockBase extends \lithium\data\Model {
  11. protected $_meta = array('connection' => null);
  12. public static $connection = null;
  13. public static function &connection() {
  14. if (!static::$connection) {
  15. $connection = new MockDatabase();
  16. return $connection;
  17. }
  18. return static::$connection;
  19. }
  20. }
  21. ?>