GSShare
in package
implements
JsonSerializable
Uses
TArrayTools
Class GSShare
Interfaces, Classes, Traits and Enums
- JsonSerializable
Table of Contents
- $TYPE_ARRAY : mixed
- $TYPE_BOOLEAN : mixed
- $TYPE_INTEGER : mixed
- $TYPE_NULL : mixed
- $TYPE_SERIALIZABLE : mixed
- $TYPE_STRING : mixed
- $circleId : string
- $defaultMountPoint : string
- $id : int
- $instance : string
- $mountPoint : string
- $owner : string
- $parent : int
- $password : string
- $token : string
- __construct() : mixed
- GSShare constructor.
- getCircleId() : string
- getDefaultMountPoint() : string
- getId() : int
- getInstance() : string
- getMountPoint() : string
- getOwner() : string
- getParent() : int
- getPassword() : string
- getToken() : string
- importFromDatabase() : GSShare
- jsonSerialize() : array<string|int, mixed>
- setCircleId() : GSShare
- setDefaultMountPoint() : GSShare
- setId() : self
- setInstance() : GSShare
- setMountPoint() : GSShare
- setOwner() : GSShare
- setParent() : GSShare
- setPassword() : GSShare
- setToken() : GSShare
- toMount() : array<string|int, mixed>
- typeOf() : string
- validKey() : bool
- cleanArray() : mixed
- extractArray() : mixed
- get() : string
- getArray() : array<string|int, mixed>
- getBool() : bool
- getFloat() : float
- getInt() : int
- getList() : array<string|int, mixed>
- getObj() : mixed
- mustContains() : mixed
Properties
$TYPE_ARRAY
public
static mixed
$TYPE_ARRAY
= 'Array'
$TYPE_BOOLEAN
public
static mixed
$TYPE_BOOLEAN
= 'Boolean'
$TYPE_INTEGER
public
static mixed
$TYPE_INTEGER
= 'Integer'
$TYPE_NULL
public
static mixed
$TYPE_NULL
= 'Null'
$TYPE_SERIALIZABLE
public
static mixed
$TYPE_SERIALIZABLE
= 'Serializable'
$TYPE_STRING
public
static mixed
$TYPE_STRING
= 'String'
$circleId
private
string
$circleId
= ''
$defaultMountPoint
private
string
$defaultMountPoint
= ''
$id
private
int
$id
= 0
$instance
private
string
$instance
= ''
$mountPoint
private
string
$mountPoint
= ''
$owner
private
string
$owner
= ''
$parent
private
int
$parent
= -1
$password
private
string
$password
= ''
$token
private
string
$token
= ''
Methods
__construct()
GSShare constructor.
public
__construct([string $circleId = '' ][, string $token = '' ]) : mixed
Parameters
- $circleId : string = ''
- $token : string = ''
Return values
mixed —getCircleId()
public
getCircleId() : string
Return values
string —getDefaultMountPoint()
public
getDefaultMountPoint() : string
Return values
string —getId()
public
getId() : int
Return values
int —getInstance()
public
getInstance() : string
Return values
string —getMountPoint()
public
getMountPoint([string $userId = '' ]) : string
Parameters
- $userId : string = ''
Return values
string —getOwner()
public
getOwner() : string
Return values
string —getParent()
public
getParent() : int
Return values
int —getPassword()
public
getPassword() : string
Return values
string —getToken()
public
getToken() : string
Return values
string —importFromDatabase()
public
importFromDatabase(array<string|int, mixed> $data) : GSShare
Parameters
- $data : array<string|int, mixed>
Return values
GSShare —jsonSerialize()
public
jsonSerialize() : array<string|int, mixed>
Return values
array<string|int, mixed> —setCircleId()
public
setCircleId(string $circleId) : GSShare
Parameters
- $circleId : string
Return values
GSShare —setDefaultMountPoint()
public
setDefaultMountPoint(string $mountPoint) : GSShare
Parameters
- $mountPoint : string
Return values
GSShare —setId()
public
setId(int $id) : self
Parameters
- $id : int
Return values
self —setInstance()
public
setInstance(string $instance) : GSShare
Parameters
- $instance : string
Return values
GSShare —setMountPoint()
public
setMountPoint(string $mountPoint) : GSShare
Parameters
- $mountPoint : string
Return values
GSShare —setOwner()
public
setOwner(string $owner) : GSShare
Parameters
- $owner : string
Return values
GSShare —setParent()
public
setParent(int $parent) : GSShare
Parameters
- $parent : int
Return values
GSShare —setPassword()
public
setPassword(string $password) : GSShare
Parameters
- $password : string
Return values
GSShare —setToken()
public
setToken(string $token) : GSShare
Parameters
- $token : string
Return values
GSShare —toMount()
public
toMount(string $userId[, string $protocol = 'https' ]) : array<string|int, mixed>
Parameters
- $userId : string
- $protocol : string = 'https'
Return values
array<string|int, mixed> —typeOf()
public
typeOf(string $key, array<string|int, mixed> $arr[, bool $root = true ]) : string
Parameters
- $key : string
- $arr : array<string|int, mixed>
- $root : bool = true
Tags
Return values
string —validKey()
public
validKey(string $k, array<string|int, mixed> $arr) : bool
Parameters
- $k : string
- $arr : array<string|int, mixed>
Return values
bool —cleanArray()
protected
cleanArray(array<string|int, mixed> &$arr) : mixed
Parameters
- $arr : array<string|int, mixed>
Return values
mixed —extractArray()
protected
extractArray(string $k, string $value, array<string|int, mixed> $list) : mixed
Parameters
- $k : string
- $value : string
- $list : array<string|int, mixed>
Tags
Return values
mixed —get()
protected
get(string $k, array<string|int, mixed> $arr[, string $default = '' ]) : string
Parameters
- $k : string
- $arr : array<string|int, mixed>
- $default : string = ''
Return values
string —getArray()
protected
getArray(string $k, array<string|int, mixed> $arr[, array<string|int, mixed> $default = [] ]) : array<string|int, mixed>
Parameters
- $k : string
- $arr : array<string|int, mixed>
- $default : array<string|int, mixed> = []
Return values
array<string|int, mixed> —getBool()
protected
getBool(string $k, array<string|int, mixed> $arr[, bool $default = false ]) : bool
Parameters
- $k : string
- $arr : array<string|int, mixed>
- $default : bool = false
Return values
bool —getFloat()
protected
getFloat(string $k, array<string|int, mixed> $arr, float $default) : float
Parameters
- $k : string
- $arr : array<string|int, mixed>
- $default : float
Return values
float —getInt()
protected
getInt(string $k, array<string|int, mixed> $arr, int $default) : int
Parameters
- $k : string
- $arr : array<string|int, mixed>
- $default : int
Return values
int —getList()
protected
getList(string $k, array<string|int, mixed> $arr, array<string|int, mixed> $import[, array<string|int, mixed> $default = [] ]) : array<string|int, mixed>
Parameters
- $k : string
- $arr : array<string|int, mixed>
- $import : array<string|int, mixed>
- $default : array<string|int, mixed> = []
Return values
array<string|int, mixed> —getObj()
protected
getObj(string $k, array<string|int, mixed> $arr[, JsonSerializable|null $default = null ]) : mixed
Parameters
- $k : string
- $arr : array<string|int, mixed>
- $default : JsonSerializable|null = null
Return values
mixed —mustContains()
protected
mustContains(array<string|int, mixed> $keys, array<string|int, mixed> $arr) : mixed
Parameters
- $keys : array<string|int, mixed>
- $arr : array<string|int, mixed>