public function __construct(Door $door, $options = array()) { $this->door = $door; parent::__construct($this->door->getSite(), $options); $contract = $this->door->getActualContract(); $this->trustee = $contract instanceof ContractInterface ? $contract->getTrustee() : $this->trustee; }
/** * * @param Fee $fee * @param FeesFollower $follower * @param array $options */ public function __construct(Fee $fee, FeesFollower $follower, $options = array()) { $this->fee = $fee; $this->follower = $follower; $contrats = $this->fee->getContracts(); parent::__construct($contrats[0]->getDoor()->getSite(), $options); $this->trustee = $this->fee->getTrustee(); }