Ubiquity 2.5.2
php rapid development framework
Loading...
Searching...
No Matches
DAOPreparedTrait.php
Go to the documentation of this file.
1<?php
2namespace Ubiquity\orm\traits;
3
8
18
19 protected static $preparedDAOQueries = [];
20
21 public static function prepareGetById($name, $className, $included = false, $cache = null) {
22 return self::$preparedDAOQueries[$name] = new DAOPreparedQueryById($className, $included, $cache);
23 }
24
25 public static function prepareGetOne($name, $className, $condition = '', $included = false, $cache = null) {
26 return self::$preparedDAOQueries[$name] = new DAOPreparedQueryOne($className, $condition, $included, $cache);
27 }
28
29 public static function prepareGetAll($name, $className, $condition = '', $included = false, $cache = null) {
30 return self::$preparedDAOQueries[$name] = new DAOPreparedQueryAll($className, $condition, $included, $cache);
31 }
32
33 public static function executePrepared($name, $params = [], $useCache = false) {
34 if (isset(self::$preparedDAOQueries[$name])) {
35 return self::$preparedDAOQueries[$name]->execute($params, $useCache);
36 }
37 return null;
38 }
39
40 public static function storeDbCachePrepared($name) {
41 if (isset(self::$preparedDAOQueries[$name])) {
42 self::$preparedDAOQueries[$name]->storeDbCache();
43 }
44 }
45
52 public static function getPrepared(string $name): DAOPreparedQuery {
53 return self::$preparedDAOQueries[$name];
54 }
55}
56
Ubiquity\orm\core\prepared$DAOPreparedQueryAll This class is part of Ubiquity.
Ubiquity\orm\core\prepared$DAOPreparedQueryOne This class is part of Ubiquity.
Ubiquity\orm\core\prepared$DAOPreparedQuery This class is part of Ubiquity.
Ubiquity\orm\core\prepared$DAOPreparedQueryOne This class is part of Ubiquity.
Ubiquity\orm\traits$DAOPreparedTrait This class is part of Ubiquity.
static prepareGetOne($name, $className, $condition='', $included=false, $cache=null)
static prepareGetAll($name, $className, $condition='', $included=false, $cache=null)
static prepareGetById($name, $className, $included=false, $cache=null)
static executePrepared($name, $params=[], $useCache=false)
static getPrepared(string $name)
Returns the daoPreparedQuery corresponding to a name.
Ubiquity\orm\traits This class is part of Ubiquity.