The SolrObject class

- « SolrDocumentField::__destruct

- SolrObject::__construct »

- PHP Manual
- Solr
- The SolrObject class

# The SolrObject class

(PECL solr >= 0.9.2)

## Introduction

This is an object whose properties can also by accessed using the array syntax. All its properties are read-only.

## Class synopsis

final class SolrObject implements ArrayAccess {
/* Methods */
public __construct()
public getPropertyNames(): array
public offsetExists(string `$property_name`): bool
public offsetGet(string `$property_name`): mixed
public offsetSet(string `$property_name`, string `$property_value`): void
public offsetUnset(string `$property_name`): void
public __destruct()
}

## Table of Contents

- SolrObject::__construct — Creates Solr object
- SolrObject::__destruct — Destructor
- SolrObject::getPropertyNames — Returns an array of all the names of the properties
- SolrObject::offsetExists — Checks if the property exists
- SolrObject::offsetGet — Used to retrieve a property
- SolrObject::offsetSet — Sets the value for a property
- SolrObject::offsetUnset — Unsets the value for the property