◆ __construct()
Initializes an user's favorites
- Parameters
 - 
  
    | String | $user_id | Id of the user  | 
  
   
 
 
◆ contain()
Returns whether the smiley with the given id is favored by the user.
- Parameters
 - 
  
    | int | $smiley_id | Id of the smiley  | 
  
   
- Returns
 - bool True if the smiley is favored by the user, false otherwise 
 
 
 
◆ gc()
Garbage collector. Removes all smiley ids from the users' favorites that are no longer in the database.
- Returns
 - int Number of changed records 
 
 
 
◆ get()
Returns the user's favored smileys' ids.
- Returns
 - Array Ids of the smileys the user has vaored 
 
 
 
◆ getUsage()
Returns a list of how often a smiley has been favored.
- Returns
 - Array Associative array with smiley name as key and according favored numbers as value 
 
 
 
◆ isEnabled()
Returns whether the ability to favor smiley is enabled.
- Returns
 - bool 
 
 
 
◆ set()
Updates the user's favored smileys.
- Parameters
 - 
  
    | Array | $favorites | Ids of the user's favored smileys  | 
  
   
 
 
◆ toggle()
      
        
          | toggle  | 
          ( | 
            | 
          $smiley_id,  | 
        
        
           | 
           | 
            | 
          $favorite = null  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
Toggles whether a smiley is favored by the user. You can either provide an acutal state or omit the state to toggle the current state.
- Parameters
 - 
  
    | int | $smiley_id | Id of the smiley to favor/disfavor  | 
    | mixed | $favorite | Either a boolean state or null to toggle current state  | 
  
   
- Returns
 - bool True if the smiley is favored by the user, false otherwise 
 
 
 
The documentation for this class was generated from the following file: