Returns the smiley object with the given id. If no such object is available, an empty object is returned.
- Parameters
-
int | $id | Id of the smiley to load |
- Returns
- Smiley Smiley object
Returns a collection smiley objects with the given ids.
- Parameters
-
mixed | $ids | Ids of the smileys to load, also accepts an atomic id |
- Returns
- Array Array of Smiley objects
static getByName |
( |
|
$name | ) |
|
|
static |
Returns the smiley object with the given name. If no such object is available, an empty object is returned
- Parameters
-
String | $name | Name of the smiley to load |
- Returns
- Smiley Smiley object
static getByShort |
( |
|
$short | ) |
|
|
static |
Returns the smiley object with the given short notation. If no such object is available, an empty object is returned
- Parameters
-
String | $short | Short notation of the smiley to load |
- Returns
- Smiley Smiley object
static getFilename |
( |
|
$name | ) |
|
|
static |
Returns the absolute filename of a smiley.
- Parameters
-
mixed | $name | Smiley name, defaults to current smiley's name |
- Returns
- String Absolute filename
static getFirstUsedCharacter |
( |
| ) |
|
|
static |
Returns an ordered unique list of the first characters of all smileys.
- Returns
- Array Ordered list of all first characters
static getGrouped |
( |
|
$group = 'all' , |
|
|
|
$mode = self::FETCH_ALL |
|
) |
| |
|
static |
Loads a given group from the database.
- Parameters
-
String | $group | Group to load, defaults to 'all' |
int | $mode | Fetch mode
- FETCH_ALL to return actual Smiley objects
- FETCH_ID to return the group's items' ids
|
- Returns
- Array Either the objects or the ids of the group's items
getImageTag |
( |
|
$tooltip = null | ) |
|
Returns the HTML image tag of the smiley
- Parameters
-
mixed | $tooltip | Tooltip to display for this smiley, defaults to smiley's name |
- Returns
- String HTML image tag
- See Also
- Smiley::img
Returns a list of all available short notations.
- Returns
- Array Associative list with short notation as key and smiley name as value
Returns some statistics about the smiley database.
- Returns
- Array 4 numbers: available, used, occurences and last change
Returns the url of a smiley.
- Parameters
-
mixed | $name | Smiley name, defaults to current smiley's name |
- Returns
- String URL
Searches the database for occurences of smileys and returns a list of how often each smiley was used. If smiley favorites are activated, the list will include the number how often a smiley was favored.
- Returns
- Array Associative array with smiley name as key and according usage numbers as value
static getUsedCharacters |
( |
| ) |
|
|
static |
Returns an associative list of the first characters of all smileys and their according quantity.
- Returns
- Array Associative list with character as key and quantity as value
img |
( |
|
$name, |
|
|
|
$tooltip = null , |
|
|
|
$width = null , |
|
|
|
$height = null |
|
) |
| |
Returns the HTML image tag of any smiley.
- Parameters
-
String | $name | Name of the smiley |
mixed | $tooltip | Tooltip to display for this smiley, defaults to smiley's name |
mixed | $width | Width of the smiley |
mixed | $height | Height of the smiley |
- Returns
- String HTML image tag
static refresh |
( |
|
$smiley_file = null | ) |
|
|
static |
Synchronizes the smileys' file system or an atomic file with the database. The smiley directory is scanned for new, changed or missing files. Any difference will change the database's record.
This method is also used for uploading new smileys. Provide an absolute filename of a smiley and it will either be imported into the database or the database will be adjusted to the current file's dimensions.
- Parameters
-
mixed | $smiley_file | If no filename is provided, the whole file system is refreshed |
- Returns
- Array Numbers: inserted, updated, removed (, favorites adjusted)
Removes a smiley or a collection of smileys from the database.
- Parameters
-
mixed | $id | Id(s) to delete, accepts either an atomic id or an array of ids |
Renames the smiley to the given new name.
- Parameters
-
String | $new_name | New name of the smiley |
- Returns
- bool true if smiley was renamed successfully, false otherwise
Stores the current smiley to database.
Refreshes the database with current usage numbers.
- Returns
- int Number of changed objects
The documentation for this class was generated from the following file: