Completed
Push — work-fleets ( 4ec5b3...fe2ede )
by SuperNova.WS
10:06
created

EntityContainer::getModel()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 2
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
nc 1
nop 0
dl 0
loc 3
rs 10
c 2
b 0
f 0
ccs 0
cts 2
cp 0
crap 2
1
<?php
2
3
namespace Entity;
4
5
use Common\ContainerAccessors;
6
7
/**
8
 * Class Entity\EntityContainer
9
 *
10
 * @property array $row - Entity row read from DB
11
 */
12
class EntityContainer extends ContainerAccessors {
13
  /**
14
   * @var EntityModel $model
15
   */
16
  protected $model;
17
18
  /**
19
   * @var \Common\Accessors $accessors
20
   */
21
  protected $accessors;
22
23
  /** @noinspection PhpMissingParentConstructorInspection */
24
  /**
25
   * Entity\EntityContainer constructor.
26
   *
27
   * @param EntityModel $model
28
   */
29
  public function __construct($model) {
30
    $this->model = $model;
31
    $this->accessors = $model->getAccessors();
32
  }
33
34
  /**
35
   * @param EntityModel $model
36
   */
37
  public function setModel(EntityModel $model) {
38
    $this->model = $model;
39
  }
40
41
  /**
42
   * @return EntityModel
43
   */
44
  public function getModel() {
45
    return $this->model;
46
  }
47
48
}
49