public function addClass($class, $options = array())
    {
        if ($this->fulltextFields || $this->filterFields || $this->sortFields) {
            throw new Exception('Can\'t add class to Index after fields have already been added');
        }

        $options = array_merge(array(
            'include_children' => true
        ), $options);

        $this->classes[$class] = $options;
    }
public function addClass($class, $options = array())
    {
        if ($this->fulltextFields || $this->filterFields || $this->sortFields) {
            throw new Exception('Can\'t add class to Index after fields have already been added');
        }

        $options = array_merge(array(
            'include_children' => true
        ), $options);

        $this->classes[$class] = $options;
    }
public function addClass ( $ class , $ options = array ( ) ) { if ( $ this -> fulltextFields || $ this -> filterFields || $ this -> sortFields ) { throw new Exception ( 'Can\'t add class to Index after fields have already been added' ) ; } $ options = array_merge ( array ( 'include_children' => true ) , $ options ) ; $ this -> classes [ $ class ] = $ options ; }
Add a DataObject subclass whose instances should be included in this index

Can only be called when addFulltextField, addFilterField, addSortField and addAllFulltextFields have not
yet been called for this index instance

@throws Exception
@param string $class - The class to include
@param array $options - TODO: Remove
Add a DataObject subclass whose instances should be included in this index