Exponential Basic 2.4.0.1 Exponential Basic CMS — PHP Class Reference

Public Member Functions | Public Attributes | List of all members
eZVoucherUsed Class Reference

## Public Member Functions
| __construct ( $id=-1)
| store ()
| delete ( $catID=-1)
| get ( $id=-1)
| fill ( $voucherArray)
& | getAll ( $offset=0, $limit=20)
| count ()
| id ()
& | used ()
| setPrice ( $value)
| setUser (&$value)
| setVoucher (&$value)
| setOrder (&$value)
& | voucher ( $asObject=true)
& | order ( $asObject=true)
& | user ( $asObject=true)
& | price ()
& | correctPrice ( $calcVAT)
| getByUser (&$user)

## Public Attributes
| $ID
| $Used
| $Price
| $UserID
| $OrderID

## Detailed Description

! ezquizgame ezquizgame documentation.

Example code:

$used = new eZVoucherUsed(); // Create a new eZVoucherUsed object.
$voucher = new eZVoucher( 4 ); // Get a voucher with id 4
$used->setVoucher( $voucher ); // Sets the voucher object.
$used->setPrice( 100 ); // Set the price.
$used->store(); // Stores the object to the database.
eZVoucherUsed
Definition: ezvoucherused.php:49
eZVoucher
Definition: ezvoucher.php:54

Definition at line 48 of file ezvoucherused.php.

## Constructor & Destructor Documentation

## ◆ __construct()

eZVoucherUsed::__construct | ( |  | $id = `-1` | ) |

Constructs a new eZVoucherUsed object.

If $id is set the object's values are fetched from the database.

Definition at line 57 of file ezvoucherused.php.

References $id, $ID, and fill().

## Member Function Documentation

## ◆ correctPrice()

& eZVoucherUsed::correctPrice | ( |  | $calcVAT | ) |

Returns the correct price of the voucher based on the logged in user, and the VAT status and use.

Definition at line 355 of file ezvoucherused.php.

References $price, $Price, $product, $vat, and voucher().

## ◆ count()

eZVoucherUsed::count | ( |  | ) |

Returns the total count.

Definition at line 215 of file ezvoucherused.php.

References $db, $result, $ret, and eZDB\globalDatabase().

Referenced by get(), and getAll().

## ◆ delete()

eZVoucherUsed::delete | ( |  | $catID = `-1` | ) |

Deletes a eZVoucherUsed object from the database.

Definition at line 122 of file ezvoucherused.php.

References $db, $ID, $res, $ret, and eZDB\globalDatabase().

## ◆ fill()

eZVoucherUsed::fill | ( |  | $voucherArray | ) |

Fills in information to the object taken from the array.

Definition at line 168 of file ezvoucherused.php.

References $db, and eZDB\globalDatabase().

Referenced by __construct(), and get().

## ◆ get()

eZVoucherUsed::get | ( |  | $id = `-1` | ) |

Fetches the object information from the database.

True is retuned if successful, false (0) if not.

Definition at line 143 of file ezvoucherused.php.

References $db, $id, $ret, count(), fill(), and eZDB\globalDatabase().

## ◆ getAll()

& eZVoucherUsed::getAll | ( |  | $offset = `0`,
|  |  | $limit = `20`
| ) |  |

Returns all the categories found in the database.

The categories are returned as an array of eZVoucherUsed objects.

Definition at line 184 of file ezvoucherused.php.

References $db, $i, $limit, $offset, count(), and eZDB\globalDatabase().

## ◆ getByUser()

eZVoucherUsed::getByUser | ( | & | $user | ) |

Get the used voucher for a user.

Definition at line 402 of file ezvoucherused.php.

References $db, $res, $result, $ret, $user, $userID, and eZDB\globalDatabase().

## ◆ id()

eZVoucherUsed::id | ( |  | ) |

Returns the object ID.

Definition at line 229 of file ezvoucherused.php.

References $ID.

## ◆ order()

& eZVoucherUsed::order | ( |  | $asObject = `true` | ) |

Returns the order of this object.

Definition at line 314 of file ezvoucherused.php.

References $OrderID, and $ret.

## ◆ price()

& eZVoucherUsed::price | ( |  | ) |

Returns the price of the voucher.

Definition at line 346 of file ezvoucherused.php.

References $Price.

## ◆ setOrder()

eZVoucherUsed::setOrder | ( | & | $value | ) |

Sets the order for this object.

Definition at line 283 of file ezvoucherused.php.

## ◆ setPrice()

eZVoucherUsed::setPrice | ( |  | $value | ) |

Sets the voucher price for this object.

Definition at line 248 of file ezvoucherused.php.

## ◆ setUser()

eZVoucherUsed::setUser | ( | & | $value | ) |

Sets the user for this object.

Definition at line 257 of file ezvoucherused.php.

## ◆ setVoucher()

eZVoucherUsed::setVoucher | ( | & | $value | ) |

Sets the voucher for this object.

Definition at line 268 of file ezvoucherused.php.

## ◆ store()

eZVoucherUsed::store | ( |  | ) |

Stores a eZVoucherUsed object to the database.

Definition at line 73 of file ezvoucherused.php.

References $db, $res, eZDB\globalDatabase(), and Password.

## ◆ used()

& eZVoucherUsed::used | ( |  | ) |

Returns the time when this voucher was used.

Definition at line 237 of file ezvoucherused.php.

References $dateTime.

## ◆ user()

& eZVoucherUsed::user | ( |  | $asObject = `true` | ) |

Returns the user of this object.

Definition at line 330 of file ezvoucherused.php.

References $ret, and $UserID.

## ◆ voucher()

& eZVoucherUsed::voucher | ( |  | $asObject = `true` | ) |

Returns the voucher of this object.

Definition at line 298 of file ezvoucherused.php.

References $ret.

Referenced by correctPrice().

## Member Data Documentation

## ◆ $ID

eZVoucherUsed::$ID

Definition at line 421 of file ezvoucherused.php.

Referenced by __construct(), delete(), and id().

## ◆ $OrderID

eZVoucherUsed::$OrderID

Definition at line 425 of file ezvoucherused.php.

Referenced by order().

## ◆ $Price

eZVoucherUsed::$Price

Definition at line 423 of file ezvoucherused.php.

Referenced by correctPrice(), and price().

## ◆ $Used

eZVoucherUsed::$Used

Definition at line 422 of file ezvoucherused.php.

## ◆ $UserID

eZVoucherUsed::$UserID

Definition at line 424 of file ezvoucherused.php.

Referenced by user().

The documentation for this class was generated from the following file:

- ezvoucherused.php

Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.