public function createBill($login, $amount, $receiver, $message)
    {
        $currencyEntry = new Gamecurrency();
        $currencyEntry->setAmount($amount);
        $currencyEntry->setSenderlogin($login);
        $currencyEntry->setReceiverlogin($receiver);
        $currencyEntry->setMessage($message);
        $currencyEntry->setDatetime(new \DateTime());
        try {
            $currencyEntry->save();

            return $currencyEntry;

        } catch (\Exception $e) {
            $this->logger->error("Error while creating bill", ["exception" => $e]);
            $this->console->write('$f00 Fail.', true);

            return false;
        }
    }
public function createBill($login, $amount, $receiver, $message)
    {
        $currencyEntry = new Gamecurrency();
        $currencyEntry->setAmount($amount);
        $currencyEntry->setSenderlogin($login);
        $currencyEntry->setReceiverlogin($receiver);
        $currencyEntry->setMessage($message);
        $currencyEntry->setDatetime(new \DateTime());
        try {
            $currencyEntry->save();

            return $currencyEntry;

        } catch (\Exception $e) {
            $this->logger->error("Error while creating bill", ["exception" => $e]);
            $this->console->write('$f00 Fail.', true);

            return false;
        }
    }
public function createBill ( $ login , $ amount , $ receiver , $ message ) { $ currencyEntry = new Gamecurrency ( ) ; $ currencyEntry -> setAmount ( $ amount ) ; $ currencyEntry -> setSenderlogin ( $ login ) ; $ currencyEntry -> setReceiverlogin ( $ receiver ) ; $ currencyEntry -> setMessage ( $ message ) ; $ currencyEntry -> setDatetime ( new \ DateTime ( ) ) ; try { $ currencyEntry -> save ( ) ; return $ currencyEntry ; } catch ( \ Exception $ e ) { $ this -> logger -> error ( "Error while creating bill" , [ "exception" => $ e ] ) ; $ this -> console -> write ( '$f00 Fail.' , true ) ; return false ; } }
Create a bill for sending it forward
@param $login
@param $amount
@param $receiver
@param $message
@return Gamecurrency|bool
Create a bill for sending it forward