public function setQuantityAttribute($iQuantity)
    {
        $iQuantity = (int) $iQuantity;
        if (empty($iQuantity) || $iQuantity < 0) {
            $iQuantity = 0;
        }

        $this->attributes['quantity'] = $iQuantity;
    }
public function setQuantityAttribute($iQuantity)
    {
        $iQuantity = (int) $iQuantity;
        if (empty($iQuantity) || $iQuantity < 0) {
            $iQuantity = 0;
        }

        $this->attributes['quantity'] = $iQuantity;
    }
public function setQuantityAttribute ( $ iQuantity ) { $ iQuantity = ( int ) $ iQuantity ; if ( empty ( $ iQuantity ) || $ iQuantity < 0 ) { $ iQuantity = 0 ; } $ this -> attributes [ 'quantity' ] = $ iQuantity ; }
Set quantity attribute value
@param  int $iQuantity
Set quantity attribute value