1 | <?php |
||
2 | /** |
||
3 | * FlexiPeeHP - Document Default Address support |
||
4 | * |
||
5 | * @author Vítězslav Dvořák <[email protected]> |
||
6 | * @copyright (C) 2018-2020 Spoje.Net |
||
7 | */ |
||
8 | |||
9 | namespace FlexiPeeHP; |
||
10 | |||
11 | /** |
||
12 | * Add for Objects use with "firma" data column |
||
13 | * @author Vítězslav Dvořák <[email protected]> |
||
14 | */ |
||
15 | trait Firma |
||
16 | { |
||
17 | /** |
||
18 | * Here Customer's or Provider's comany object live |
||
19 | * @var \FlexiPeeHP\Adresar |
||
20 | */ |
||
21 | public $firma = null; |
||
22 | |||
23 | /** |
||
24 | * Instance of Adresar( $this->getDataValue('firma') ) |
||
25 | * |
||
26 | * @return Adresar |
||
27 | */ |
||
28 | public function getFirmaObject() |
||
29 | { |
||
30 | if (is_null($this->firma)) { |
||
31 | $this->firma = new Adresar($this->getDataValue('firma'), |
||
0 ignored issues
–
show
Bug
introduced
by
![]() |
|||
32 | ['details' => 'id']); |
||
33 | } |
||
34 | return $this->firma; |
||
35 | } |
||
36 | } |
||
37 |