class Address implements Serializable (View source)

Represents a specific address in a cache, or everything in one bin, or everything in the entire cache.

Methods

__construct(string|null $bin = null, string|null $key = null)

Address constructor.

string|null
getBin()

Get the bin.

string|null
getKey()

Get the key.

boolean
isEntireBin()

Return true if address refers to everything in the entire bin.

boolean
isEntireCache()

Return true if address refers to everything in the entire cache.

boolean
isMatch(Address $address)

Return true if this object refers to any of the same objects as the provided Address object.

string
serialize()

Serialize this object, returning a string representing this address.

unserialize(string $serialized)

Unpack a serialized Address into this object.

Details

at line line 22
__construct(string|null $bin = null, string|null $key = null)

Address constructor.

Parameters

string|null $bin
string|null $key

at line line 33
string|null getBin()

Get the bin.

Return Value

string|null

at line line 42
string|null getKey()

Get the key.

Return Value

string|null

at line line 51
boolean isEntireBin()

Return true if address refers to everything in the entire bin.

Return Value

boolean

at line line 60
boolean isEntireCache()

Return true if address refers to everything in the entire cache.

Return Value

boolean

at line line 71
boolean isMatch(Address $address)

Return true if this object refers to any of the same objects as the provided Address object.

Parameters

Address $address

Return Value

boolean

at line line 93
string serialize()

Serialize this object, returning a string representing this address.

The serialized form must:

  • Place the bin first
  • Return a prefix matching all entries in a bin with a NULL key
  • Return a prefix matching all entries with a NULL bin

Return Value

string

at line line 111
unserialize(string $serialized)

Unpack a serialized Address into this object.

Parameters

string $serialized