public function setCarteira($carteira) { if (!in_array($carteira, $this->getCarteiras())) { throw new \Exception("Carteira não disponível!"); } $this->carteira = $carteira; return $this; }