Skip to content

Commit 668c5a4

Browse files
committed
Get Other Repositories from Wrappers Repository
1 parent bb63dfd commit 668c5a4

File tree

3 files changed

+13
-2
lines changed

3 files changed

+13
-2
lines changed

src/PHPixie/ORM/Models/Type/Database/Implementation/Repository.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,12 @@ public function modelName()
3131
{
3232
return $this->config->model;
3333
}
34-
34+
35+
public function databaseModel()
36+
{
37+
return $this->databaseModel;
38+
}
39+
3540
public function query()
3641
{
3742
return $this->databaseModel->query($this->modelName());

src/PHPixie/ORM/Models/Type/Database/Repository.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ public function save($entity);
1010
public function delete($entity);
1111
public function load($data);
1212
public function create();
13+
public function databaseModel();
1314

1415
/**
1516
* @return Query

src/PHPixie/ORM/Wrappers/Type/Database/Repository.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,12 @@ public function __construct($repository)
1313
{
1414
$this->repository = $repository;
1515
}
16-
16+
17+
public function databaseModel()
18+
{
19+
return $this->repository->databaseModel();
20+
}
21+
1722
public function config()
1823
{
1924
return $this->repository->config();

0 commit comments

Comments
 (0)