| @@ 53-64 (lines=12) @@ | ||
| 50 | * @since 7.0.0 |
|
| 51 | * @deprecated 14.0.0 Move over to QBMapper |
|
| 52 | */ |
|
| 53 | public function __construct(IDBConnection $db, $tableName, $entityClass=null){ |
|
| 54 | $this->db = $db; |
|
| 55 | $this->tableName = '*PREFIX*' . $tableName; |
|
| 56 | ||
| 57 | // if not given set the entity name to the class without the mapper part |
|
| 58 | // cache it here for later use since reflection is slow |
|
| 59 | if($entityClass === null) { |
|
| 60 | $this->entityClass = str_replace('Mapper', '', get_class($this)); |
|
| 61 | } else { |
|
| 62 | $this->entityClass = $entityClass; |
|
| 63 | } |
|
| 64 | } |
|
| 65 | ||
| 66 | ||
| 67 | /** |
|
| @@ 55-66 (lines=12) @@ | ||
| 52 | * mapped to queries without using sql |
|
| 53 | * @since 14.0.0 |
|
| 54 | */ |
|
| 55 | public function __construct(IDBConnection $db, string $tableName, string $entityClass=null){ |
|
| 56 | $this->db = $db; |
|
| 57 | $this->tableName = $tableName; |
|
| 58 | ||
| 59 | // if not given set the entity name to the class without the mapper part |
|
| 60 | // cache it here for later use since reflection is slow |
|
| 61 | if($entityClass === null) { |
|
| 62 | $this->entityClass = str_replace('Mapper', '', \get_class($this)); |
|
| 63 | } else { |
|
| 64 | $this->entityClass = $entityClass; |
|
| 65 | } |
|
| 66 | } |
|
| 67 | ||
| 68 | ||
| 69 | /** |
|