Source for file Document.php
Documentation is available at Document.php
* @copyright Copyright 2007 Conduit Internet Technologies, Inc. (http://conduit-it.com)
* @license Apache Licence, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0)
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* @author Donovan Jimenez <djimenez@conduit-it.com>
* Holds Key / Value pairs that represent a Solr Document. Field values can be accessed
* by direct dereferencing such as:
* $document->title = 'Something';
* Additionally, the field values can be iterated with foreach
* foreach ($document as $key => $value)
* Magic get for field values
public function __get($key)
* Magic set for field values. Multi-valued fields should be set as arrays
* or instead use the setMultiValue(...) function which will automatically
* make sure the field is an array.
public function __set($key, $value)
* Magic isset for fields values. Do no call directly. Allows usage:
* isset($document->some_field);
return isset
($this->_fields[$key]);
* Magic unset for field values. Do no call directly. Allows usage:
* unset($document->some_field);
* Handle the array manipulation for a multi-valued field
* Get the names of all fields in this document
* Iterator implementation function, proxies to _fields. Allows usage:
* foreach ($document as $key => $value)
* Iterator implementation function, proxies to _fields. Allows usage:
* foreach ($document as $key => $value)
* Iterator implementation function, proxies to _fields. Allows usage:
* foreach ($document as $key => $value)
* Iterator implementation function, proxies to _fields. Allows usage:
* foreach ($document as $key => $value)
* Iterator implementation function, proxies to _fields. Allows usage:
* foreach ($document as $key => $value)
public function valid() {
Documentation generated on Tue, 02 Sep 2008 10:45:04 -0400 by phpDocumentor 1.4.0