| @@ 5-38 (lines=34) @@ | ||
| 2 | ||
| 3 | use Cartalyst\Support\Traits\RepositoryTrait; |
|
| 4 | ||
| 5 | class JobsRepository implements JobsRepositoryInterface |
|
| 6 | { |
|
| 7 | use RepositoryTrait; |
|
| 8 | ||
| 9 | /** |
|
| 10 | * The Logs model name. |
|
| 11 | * |
|
| 12 | * @var string |
|
| 13 | */ |
|
| 14 | protected $model = 'jlourenco\base\Models\Jobs'; |
|
| 15 | ||
| 16 | /** |
|
| 17 | * Create a new visits repository. |
|
| 18 | * |
|
| 19 | * @param string $model |
|
| 20 | */ |
|
| 21 | public function __construct($model = null) |
|
| 22 | { |
|
| 23 | if (isset($model)) |
|
| 24 | $this->model = $model; |
|
| 25 | } |
|
| 26 | ||
| 27 | /** |
|
| 28 | * {@inheritDoc} |
|
| 29 | */ |
|
| 30 | public function findById($id) |
|
| 31 | { |
|
| 32 | return $this |
|
| 33 | ->createModel() |
|
| 34 | ->newQuery() |
|
| 35 | ->find($id); |
|
| 36 | } |
|
| 37 | ||
| 38 | } |
|
| 39 | ||
| @@ 5-38 (lines=34) @@ | ||
| 2 | ||
| 3 | use Cartalyst\Support\Traits\RepositoryTrait; |
|
| 4 | ||
| 5 | class LogRepository implements LogRepositoryInterface |
|
| 6 | { |
|
| 7 | use RepositoryTrait; |
|
| 8 | ||
| 9 | /** |
|
| 10 | * The Logs model name. |
|
| 11 | * |
|
| 12 | * @var string |
|
| 13 | */ |
|
| 14 | protected $model = 'jlourenco\base\Models\Logs'; |
|
| 15 | ||
| 16 | /** |
|
| 17 | * Create a new log repository. |
|
| 18 | * |
|
| 19 | * @param string $model |
|
| 20 | */ |
|
| 21 | public function __construct($model = null) |
|
| 22 | { |
|
| 23 | if (isset($model)) |
|
| 24 | $this->model = $model; |
|
| 25 | } |
|
| 26 | ||
| 27 | /** |
|
| 28 | * {@inheritDoc} |
|
| 29 | */ |
|
| 30 | public function findById($id) |
|
| 31 | { |
|
| 32 | return $this |
|
| 33 | ->createModel() |
|
| 34 | ->newQuery() |
|
| 35 | ->find($id); |
|
| 36 | } |
|
| 37 | ||
| 38 | } |
|
| 39 | ||
| @@ 5-38 (lines=34) @@ | ||
| 2 | ||
| 3 | use Cartalyst\Support\Traits\RepositoryTrait; |
|
| 4 | ||
| 5 | class UserRepository implements UserRepositoryInterface |
|
| 6 | {
|
|
| 7 | use RepositoryTrait; |
|
| 8 | ||
| 9 | /** |
|
| 10 | * The Settings model name. |
|
| 11 | * |
|
| 12 | * @var string |
|
| 13 | */ |
|
| 14 | protected $model = 'jlourenco\base\Models\BaseUser'; |
|
| 15 | ||
| 16 | /** |
|
| 17 | * Create a new settings repository. |
|
| 18 | * |
|
| 19 | * @param string $model |
|
| 20 | */ |
|
| 21 | public function __construct($model = null) |
|
| 22 | {
|
|
| 23 | if (isset($model)) |
|
| 24 | $this->model = $model; |
|
| 25 | } |
|
| 26 | ||
| 27 | /** |
|
| 28 | * {@inheritDoc}
|
|
| 29 | */ |
|
| 30 | public function findById($id) |
|
| 31 | {
|
|
| 32 | return $this |
|
| 33 | ->createModel() |
|
| 34 | ->newQuery() |
|
| 35 | ->find($id); |
|
| 36 | } |
|
| 37 | ||
| 38 | } |
|
| 39 | ||
| @@ 5-38 (lines=34) @@ | ||
| 2 | ||
| 3 | use Cartalyst\Support\Traits\RepositoryTrait; |
|
| 4 | ||
| 5 | class VisitsRepository implements VisitsRepositoryInterface |
|
| 6 | { |
|
| 7 | use RepositoryTrait; |
|
| 8 | ||
| 9 | /** |
|
| 10 | * The Logs model name. |
|
| 11 | * |
|
| 12 | * @var string |
|
| 13 | */ |
|
| 14 | protected $model = 'jlourenco\base\Models\Visits'; |
|
| 15 | ||
| 16 | /** |
|
| 17 | * Create a new visits repository. |
|
| 18 | * |
|
| 19 | * @param string $model |
|
| 20 | */ |
|
| 21 | public function __construct($model = null) |
|
| 22 | { |
|
| 23 | if (isset($model)) |
|
| 24 | $this->model = $model; |
|
| 25 | } |
|
| 26 | ||
| 27 | /** |
|
| 28 | * {@inheritDoc} |
|
| 29 | */ |
|
| 30 | public function findById($id) |
|
| 31 | { |
|
| 32 | return $this |
|
| 33 | ->createModel() |
|
| 34 | ->newQuery() |
|
| 35 | ->find($id); |
|
| 36 | } |
|
| 37 | ||
| 38 | } |
|
| 39 | ||