PHP Class app\models\Player

Inheritance: extends Illuminate\Database\Eloquent\Model
Show file Open project: printempw/blessing-skin-server Class Usage Examples

Public Properties

Property Type Description
$primaryKey Properties for Eloquent Model.
$timestamps

Protected Properties

Property Type Description
$fillable
$models Set of models.

Public Methods

Method Description
clearTexture ( ) : mixed Clear the textures of player.
generateJsonProfile ( integer $api_type ) : string Generate player profile in json format.
getBinaryTexture ( string $type ) : Illuminate\Http\Response Get binary texture by type.
getJsonProfile ( integer $api_type ) : string Get Json profile of player.
getLastModified ( ) : timestamp Get time of last modified.
getPreference ( ) : string Get model preference of the player.
getTexture ( string $type ) : string Get specific texture of player.
isBanned ( ) : boolean Check if the player is banned.
rename ( string $new_name ) : mixed Rename the player.
scopeLike ( $query, $field, $value )
setOwner ( integer $uid ) Set a new owner for the player.
setPreference ( string $type ) Set preferred model for the player.
setTexture ( array $tids ) : mixed Set textures for the player.
updateLastModified ( ) : mixed Update the date of last modified.
user ( ) : App\Models\User Return the owner of the player.

Method Details

clearTexture() public method

Clear the textures of player.
public clearTexture ( ) : mixed
return mixed

generateJsonProfile() public method

Generate player profile in json format.
public generateJsonProfile ( integer $api_type ) : string
$api_type integer
return string

getBinaryTexture() public method

Get binary texture by type.
public getBinaryTexture ( string $type ) : Illuminate\Http\Response
$type string steve|alex|cape
return Illuminate\Http\Response

getJsonProfile() public method

Get Json profile of player.
public getJsonProfile ( integer $api_type ) : string
$api_type integer Which API to use, 0 for CustomSkinAPI, 1 for UniSkinAPI
return string User profile in json format

getLastModified() public method

Get time of last modified.
public getLastModified ( ) : timestamp
return timestamp

getPreference() public method

Get model preference of the player.
public getPreference ( ) : string
return string

getTexture() public method

Get specific texture of player.
public getTexture ( string $type ) : string
$type string steve|alex|cape
return string Sha256-hash of texture file.

isBanned() public method

Check if the player is banned.
public isBanned ( ) : boolean
return boolean

rename() public method

Rename the player.
public rename ( string $new_name ) : mixed
$new_name string
return mixed

scopeLike() public method

public scopeLike ( $query, $field, $value )

setOwner() public method

Set a new owner for the player.
public setOwner ( integer $uid )
$uid integer

setPreference() public method

Set preferred model for the player.
public setPreference ( string $type )
$type string slim|default

setTexture() public method

Set textures for the player.
public setTexture ( array $tids ) : mixed
$tids array
return mixed

updateLastModified() public method

Update the date of last modified.
public updateLastModified ( ) : mixed
return mixed

user() public method

Return the owner of the player.
public user ( ) : App\Models\User
return App\Models\User

Property Details

$fillable protected property

protected $fillable

$models protected static property

Set of models.
protected static $models

$primaryKey public property

Properties for Eloquent Model.
public $primaryKey

$timestamps public property

public $timestamps