public function setTransactionMethod($method)
    {
        // check if is array
        if (!is_array($this->transactionMethods)) {
            $this->transactionMethods = [$method];

            return $this;
        }

        // check if method is already in array
        if (!in_array($method, $this->transactionMethods)) {
            $this->transactionMethods[] = $method;
        }

        return $this;
    }
public function setTransactionMethod($method)
    {
        // check if is array
        if (!is_array($this->transactionMethods)) {
            $this->transactionMethods = [$method];

            return $this;
        }

        // check if method is already in array
        if (!in_array($method, $this->transactionMethods)) {
            $this->transactionMethods[] = $method;
        }

        return $this;
    }
public function setTransactionMethod ( $ method ) { // check if is array if ( ! is_array ( $ this -> transactionMethods ) ) { $ this -> transactionMethods = [ $ method ] ; return $ this ; } // check if method is already in array if ( ! in_array ( $ method , $ this -> transactionMethods ) ) { $ this -> transactionMethods [ ] = $ method ; } return $ this ; }
Set transaction method.

@param string $method - method name

@return $this
Set transaction method .