public function __construct(Session $session) { $this->session = $session; $this->session->transaction = $this; }