Exponential Basic 2.4.0.1 Exponential Basic CMS — PHP Class Reference

Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
eZBug Class Reference

## Public Member Functions
| __construct ( $id=-1)
| store ()
| delete ()
| get ( $id=-1)
| getAll ()
& | getUnhandled ()
| id ()
| name ( $html=true)
| userEmail ( $html=true)
| description ( $html=true)
& | created ()
| isHandled ()
| isClosed ()
| isPrivate ()
| user ()
| owner ()
| setName ( $value)
| setUserEmail ( $mail)
| setDescription ( $value)
| setIsHandled ( $value)
| setIsCLosed ( $value)
| setUser ( $user)
| setPriority ( $pri)
| setStatus ( $status)
| setOwner ( $user)
| setIsPrivate ( $priv)
| setVersion ( $value)
| version ( $asHTML=true)
| priority ()
| status ()
| module ( $IDOnly=false)
| category ()
| removeFromCategories ()
| removeFromModules ()
| search ( $query, $offset=0, $limit=25)
| searchCount ( $query)
| addImage ( $image)
| deleteImage ( $image)
| images ()
| addFile ( $file)
| deleteFile ( $file)
| files ()

## Static Public Member Functions
| bugExists ( $id)

## Public Attributes
| $ID
| $Name
| $Description
| $IsHandled
| $IsClosed
| $Created
| $UserID
| $UserEmail
| $PriorityID
| $StatusID
| $OwnerID
| $IsPrivate =0
| $Version

## Detailed Description

! eZBug eZBug handles bug repports.

The eZBug class handles bug reports. Each bug report can be a member of one or more modules. The modules are handled by the eZBugModule class.

Each bug report is assigned to a bug category. The categories are handled by the eZBugCategory class.

A bug which gets reported is assigned to unhandled bugs list. Handled bugs is stored in the archive. A handled bug is assigned a priority and a status.

The priorities are handled by the eZBugPriority class. Priorities can be e.g. urgent, medium and low.

The statuses are handled by the eZBugStatus class. Statuses ca be e.g. started, done and will not be fixed.

Example:

// include the class
// include_once( "ezbug/classes/ezbug.php" );
// create a new eZBug object.
$bug = new eZBug();
// set the object properties and save it to the database.
$bug->setUser( eZUser::currentUser() );
$bug->setName( "Empty search result" );
$bug->setDescription( "The product search does not return anything." );
$bug->setIsHandled( false );
$bug->store();
$bug
$bug
Definition: bugpreview.php:59
eZBug
Definition: ezbug.php:80
eZUser\currentUser
static & currentUser()
Definition: ezuser.php:896

See also
  eZBug eZBugCategory eZBugModule

TODO

Definition at line 79 of file ezbug.php.

## Constructor & Destructor Documentation

## ◆ __construct()

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

Constructs a new eZBug object.

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

Definition at line 87 of file ezbug.php.

References $ID, and $id.

## Member Function Documentation

## ◆ addFile()

eZBug::addFile | ( |  | $file | ) |

Adds an file to the bug.

Definition at line 787 of file ezbug.php.

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

## ◆ addImage()

eZBug::addImage | ( |  | $image | ) |

Connects the image $image of type eZImage with this bug.

Definition at line 724 of file ezbug.php.

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

## ◆ bugExists()

eZBug::bugExists | ( |  | $id | ) |
| static

Checks if a bug exists

Definition at line 853 of file ezbug.php.

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

## ◆ category()

eZBug::category | ( |  | ) |

Returns the category which the bug is a part of.

If the bug is not assigned to any category false is returned.

Definition at line 616 of file ezbug.php.

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

## ◆ created()

& eZBug::created | ( |  | ) |

Returns the creation time of the bug.

The time is returned as a eZDateTime object.

Definition at line 327 of file ezbug.php.

References $dateTime.

## ◆ delete()

eZBug::delete | ( |  | ) |

Deletes a eZBugGroup object from the database.

Definition at line 185 of file ezbug.php.

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

## ◆ deleteFile()

eZBug::deleteFile | ( |  | $file | ) |

Deletes an file from the article.

Definition at line 813 of file ezbug.php.

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

## ◆ deleteImage()

eZBug::deleteImage | ( |  | $image | ) |

Deletes an eZImage screenshot from the bug.

Definition at line 749 of file ezbug.php.

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

## ◆ description()

eZBug::description | ( |  | $html = `true` | ) |

Returns the group description.

Definition at line 314 of file ezbug.php.

References $Description.

## ◆ files()

eZBug::files | ( |  | ) |

Returns every file to a article as a array of eZFile objects.

Definition at line 834 of file ezbug.php.

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

## ◆ get()

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

Fetches the object information from the database.

Definition at line 204 of file ezbug.php.

References $db, $id, eZDB\globalDatabase(), and Name.

## ◆ getAll()

eZBug::getAll | ( |  | ) |

Returns all the bugs found in the database.

The bugs are returned as an array of eZBug objects.

Definition at line 239 of file ezbug.php.

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

## ◆ getUnhandled()

& eZBug::getUnhandled | ( |  | ) |

Returns all the unhandled bugs found in the database.

The bugs are returned as an array of eZBug objects.

Definition at line 260 of file ezbug.php.

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

## ◆ id()

eZBug::id | ( |  | ) |

Returns the object id.

Definition at line 283 of file ezbug.php.

References $ID.

## ◆ images()

eZBug::images | ( |  | ) |

Returns all images set to this bug as a array of eZImage objects.

Definition at line 768 of file ezbug.php.

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

## ◆ isClosed()

eZBug::isClosed | ( |  | ) |

Returns true if the bug is closed false if not.

Definition at line 352 of file ezbug.php.

References $ret.

## ◆ isHandled()

eZBug::isHandled | ( |  | ) |

Returns true if the bug is handled false if not.

Definition at line 339 of file ezbug.php.

References $ret.

## ◆ isPrivate()

eZBug::isPrivate | ( |  | ) |

This function returns true if the bug is private, false if not. A private bug can only be seen by priveliged users and admins.

Definition at line 366 of file ezbug.php.

References $ret.

## ◆ module()

eZBug::module | ( |  | $IDOnly = `false` | ) |

Returns the module which the bug is a part of.

If the bug is not assigned to any module false is returned.

Definition at line 594 of file ezbug.php.

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

## ◆ name()

eZBug::name | ( |  | $html = `true` | ) |

Returns the name of the bug.

Definition at line 291 of file ezbug.php.

References $Name, and Name.

## ◆ owner()

eZBug::owner | ( |  | ) |

Returns the bug owner as an eZUser object.

Returns 0 if the user was not set.

Definition at line 397 of file ezbug.php.

References $ret, and $user.

## ◆ priority()

eZBug::priority | ( |  | ) |

Returns the priority assigned to the bug as an eZBugPriority object.

If no priority is assigned 0 / false is returned.

Definition at line 560 of file ezbug.php.

References $ret.

## ◆ removeFromCategories()

eZBug::removeFromCategories | ( |  | ) |

Removes the category assignments.

Definition at line 634 of file ezbug.php.

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

## ◆ removeFromModules()

eZBug::removeFromModules | ( |  | ) |

Removes the module assignments.

Definition at line 659 of file ezbug.php.

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

## ◆ search()

eZBug::search | ( |  | $query,
|  |  | $offset = `0`,
|  |  | $limit = `25`
| ) |  |

Searches the bug database and returns the result as an array of eZBug objects.

Default limit is set to 25.

Definition at line 680 of file ezbug.php.

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

## ◆ searchCount()

eZBug::searchCount | ( |  | $query | ) |

Returns the search count.

Definition at line 706 of file ezbug.php.

References $db, $query, and eZDB\globalDatabase().

## ◆ setDescription()

eZBug::setDescription | ( |  | $value | ) |

Sets the description of the module.

Definition at line 436 of file ezbug.php.

## ◆ setIsCLosed()

eZBug::setIsCLosed | ( |  | $value | ) |

Sets the bug to closed or not.

Definition at line 459 of file ezbug.php.

## ◆ setIsHandled()

eZBug::setIsHandled | ( |  | $value | ) |

Sets the bug to handled or not.

Definition at line 444 of file ezbug.php.

## ◆ setIsPrivate()

eZBug::setIsPrivate | ( |  | $priv | ) |

Sets the bug to be private if the parameter is true. A private bug can only be seen by priveliged users and admins.

Definition at line 524 of file ezbug.php.

## ◆ setName()

eZBug::setName | ( |  | $value | ) |

Sets the name of the module.

Definition at line 411 of file ezbug.php.

References Name.

## ◆ setOwner()

eZBug::setOwner | ( |  | $user | ) |

Sets the owner of the bug. If $user is not of type eZUser the owner is set to NULL.

Definition at line 508 of file ezbug.php.

References $user.

## ◆ setPriority()

eZBug::setPriority | ( |  | $pri | ) |

Sets the priority assigned to the bug.

Definition at line 485 of file ezbug.php.

References $pri.

## ◆ setStatus()

eZBug::setStatus | ( |  | $status | ) |

Sets the status assigned to the bug.

Definition at line 496 of file ezbug.php.

References $status.

## ◆ setUser()

eZBug::setUser | ( |  | $user | ) |

Sets the user whom reported the bug.

Definition at line 474 of file ezbug.php.

References $user.

## ◆ setUserEmail()

eZBug::setUserEmail | ( |  | $mail | ) |

Sets the email address to the user.

False is returned if the e-mail address is not valid.

Definition at line 421 of file ezbug.php.

References $mail, $ret, and eZMail\validate().

## ◆ setVersion()

eZBug::setVersion | ( |  | $value | ) |

Sets the version number

Definition at line 539 of file ezbug.php.

## ◆ status()

eZBug::status | ( |  | ) |

Returns the status assigned to the bug as an eZBugStatus object.

If no staus is assigned 0 / false is returned.

Definition at line 578 of file ezbug.php.

References $ret.

## ◆ store()

eZBug::store | ( |  | ) |

Stores a eZBug object to the database.

Definition at line 108 of file ezbug.php.

References $db, $name, $res, $version, eZDB\globalDatabase(), and Name.

## ◆ user()

eZBug::user | ( |  | ) |

Returns the user as an eZUser object.

Returns 0 if the user was not set.

Definition at line 381 of file ezbug.php.

References $ret, and $user.

## ◆ userEmail()

eZBug::userEmail | ( |  | $html = `true` | ) |

Returns the email address to the reporter.

Definition at line 302 of file ezbug.php.

References $UserEmail.

## ◆ version()

eZBug::version | ( |  | $asHTML = `true` | ) |

Returns the version number

Definition at line 547 of file ezbug.php.

References $Version.

## Member Data Documentation

## ◆ $Created

eZBug::$Created

Definition at line 865 of file ezbug.php.

## ◆ $Description

eZBug::$Description

Definition at line 862 of file ezbug.php.

Referenced by description().

## ◆ $ID

eZBug::$ID

Definition at line 860 of file ezbug.php.

Referenced by __construct(), and id().

## ◆ $IsClosed

eZBug::$IsClosed

Definition at line 864 of file ezbug.php.

## ◆ $IsHandled

eZBug::$IsHandled

Definition at line 863 of file ezbug.php.

## ◆ $IsPrivate

eZBug::$IsPrivate =0

Definition at line 871 of file ezbug.php.

## ◆ $Name

eZBug::$Name

Definition at line 861 of file ezbug.php.

Referenced by name().

## ◆ $OwnerID

eZBug::$OwnerID

Definition at line 870 of file ezbug.php.

## ◆ $PriorityID

eZBug::$PriorityID

Definition at line 868 of file ezbug.php.

## ◆ $StatusID

eZBug::$StatusID

Definition at line 869 of file ezbug.php.

## ◆ $UserEmail

eZBug::$UserEmail

Definition at line 867 of file ezbug.php.

Referenced by userEmail().

## ◆ $UserID

eZBug::$UserID

Definition at line 866 of file ezbug.php.

## ◆ $Version

eZBug::$Version

Definition at line 872 of file ezbug.php.

Referenced by version().

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

- ezbug.php

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