Beispiel #1
0
 /**
  * Trace constructor.
  *
  * @param User|null $initiatingUser
  */
 public function __construct(User $initiatingUser = null)
 {
     $this->initiated = new DateTime();
     if ($initiatingUser) {
         $this->initiator = Initiator::fromUser($initiatingUser);
     }
 }
Beispiel #2
0
 /**
  * Trace constructor.
  *
  * @param Context   $context
  * @param User|null $initiatingUser
  */
 private function __construct(Context $context, User $initiatingUser = null)
 {
     $this->context = $context;
     $this->initiated = new DateTime();
     if ($initiatingUser) {
         $this->initiator = Initiator::fromUser($initiatingUser);
     }
 }