PHP Class app\models\Closet

Afficher le fichier Open project: printempw/blessing-skin-server Class Usage Examples

Méthodes publiques

Свойство Type Description
$uid

Méthodes publiques

Méthode Description
__construct ( integer $uid ) Construct Closet object with owner's uid.
__destruct ( ) Save when the object will be destructed.
add ( integer $tid, string $name ) : boolean Add an item to the closet.
getItems ( string $category = "all" ) : array Get array of instances of App\Models\Texture.
has ( integer $tid ) : boolean Check if texture is in the closet.
remove ( integer $tid ) : boolean Remove a texture from closet.
rename ( integer $tid, string $new_name ) : void Rename closet item.
save ( ) : boolean Do really database operations.
setTextures ( string $textures ) Set textures string manually.

Private Methods

Méthode Description
checkTextureExist ( integer $tid ) : boolean Check if given tid is valid.

Method Details

__construct() public méthode

Construct Closet object with owner's uid.
public __construct ( integer $uid )
$uid integer

__destruct() public méthode

Save when the object will be destructed.
public __destruct ( )

add() public méthode

Add an item to the closet.
public add ( integer $tid, string $name ) : boolean
$tid integer
$name string
Résultat boolean

getItems() public méthode

Get array of instances of App\Models\Texture.
public getItems ( string $category = "all" ) : array
$category string skin|cape|all
Résultat array

has() public méthode

Check if texture is in the closet.
public has ( integer $tid ) : boolean
$tid integer
Résultat boolean

remove() public méthode

Remove a texture from closet.
public remove ( integer $tid ) : boolean
$tid integer
Résultat boolean

rename() public méthode

Rename closet item.
public rename ( integer $tid, string $new_name ) : void
$tid integer
$new_name string
Résultat void

save() public méthode

Do really database operations.
public save ( ) : boolean
Résultat boolean

setTextures() public méthode

Set textures string manually.
public setTextures ( string $textures )
$textures string

Property Details

$uid public_oe property

public $uid