final class SolrObject implements ArrayAccess (View source)

(PECL solr >= 0.9.2)
Class SolrObject
This class represents an object whose properties can also by accessed using the array syntax. All its properties are read-only.

Methods

__construct()

(PECL solr >= 0.9.2)
SolrObject constructor.

__destruct()

(PECL solr >= 0.9.2)
Destructor

array
getPropertyNames()

(PECL solr >= 0.9.2)
Returns an array of all the names of the properties

bool
offsetExists(string $property_name)

(PECL solr >= 0.9.2)
Checks if the property exists

mixed
offsetGet(string $property_name)

(PECL solr >= 0.9.2)
Used to retrieve a property

void
offsetSet(string $property_name, string $property_value)

(PECL solr >= 0.9.2)
Sets the value for a property

void
offsetUnset(string $property_name)

(PECL solr >= 0.9.2)
Unsets the value for the property

Details

__construct()

(PECL solr >= 0.9.2)
SolrObject constructor.

__destruct()

(PECL solr >= 0.9.2)
Destructor

array getPropertyNames()

(PECL solr >= 0.9.2)
Returns an array of all the names of the properties

Return Value

array

Returns an array.

bool offsetExists(string $property_name)

(PECL solr >= 0.9.2)
Checks if the property exists

Parameters

string $property_name

The name of the property.

Return Value

bool

true on success or false on failure.

The return value will be casted to boolean if non-boolean was returned.

mixed offsetGet(string $property_name)

(PECL solr >= 0.9.2)
Used to retrieve a property

Parameters

string $property_name

The name of the property.

Return Value

mixed

Can return all value types.

void offsetSet(string $property_name, string $property_value)

(PECL solr >= 0.9.2)
Sets the value for a property

Parameters

string $property_name

The name of the property.

string $property_value

The new value.

Return Value

void

void offsetUnset(string $property_name)

(PECL solr >= 0.9.2)
Unsets the value for the property

Parameters

string $property_name

The name of the property.

Return Value

void