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