SchemaFactory
extends ViewableData
in package
Uses
GetSetSchemaFactoryTrait
Class SchemaFactory
Table of Contents
Properties
- $baseTemplatePath : array<string|int, mixed>
- $coreService : SolrCoreService
- $fieldResolver : FieldResolver
- $index : BaseIndex
- Index to generate the schema for
- $store : bool
- Store the value in Solr
- $storeFields : array<string|int, mixed>
- $template : string
- ABSOLUTE Path to template
- $typesTemplate : string
- ABSOLUTE Path to types.ss template
Methods
- __construct() : mixed
- SchemaFactory constructor.
- generateSchema() : DBHTMLText
- Generate the Schema xml
- getBaseTemplatePath() : string|bool
- Retrieve the base template path for a type (extra or schema)
- getClassID() : string
- Get the Identifier Field for Solr
- getCopyFieldDefinitions() : ArrayList
- Get the definition of a copy field for determining what to load in to Solr
- getCopyFields() : ArrayList
- Get the fields that should be copied
- getDefaultField() : string|array<string|int, mixed>
- Get the default field to generate df components for
- getExtrasPath() : string
- Get any the template path for anything that needs loading in to Solr
- getFilterFieldDefinitions() : ArrayList
- Get the definitions of a filter field to load in to Solr.
- getFulltextFieldDefinitions() : ArrayList
- Get all fulltext field definitions that are loaded
- getIDField() : string
- Get the Identifier Field for Solr
- getIndex() : BaseIndex
- Get the Index that's being used
- getIndexName() : string
- Get the name of the index being used
- getTemplate() : string
- Get the base template for the schema xml
- getTemplatePathFor() : string
- Get the base path of the template given, e.g. the "schema" templates or the "extra" templates.
- getTypes() : DBHTMLText
- Get the types template in a rendered state
- getTypesTemplate() : string
- Get the types template if defined
- setBaseTemplatePath() : SchemaFactory
- Set the base template path for a type (extra or schema)
- setIndex() : SchemaFactory
- Set the index that's being used and add the introspection for it
- setStore() : void
- Set the store value
- setTemplate() : SchemaFactory
- Set a custom template for schema xml
- setTypesTemplate() : SchemaFactory
- Set custom types template
- getFieldDefinition() : mixed
- Get the field definition for a single field
- getStoreFields() : array<string|int, mixed>
- Get the stored fields. This includes boosted and faceted fields
Properties
$baseTemplatePath
protected
array<string|int, mixed>
$baseTemplatePath
Base paths to the template
$coreService
protected
SolrCoreService
$coreService
CoreService to use
$fieldResolver
protected
FieldResolver
$fieldResolver
The field resolver to find a field for a class
$index
Index to generate the schema for
protected
BaseIndex
$index
$store
Store the value in Solr
protected
bool
$store
= false
$storeFields
protected
static array<string|int, mixed>
$storeFields
= []
Fields that always need to be stored, by Index name
$template
ABSOLUTE Path to template
protected
string
$template
$typesTemplate
ABSOLUTE Path to types.ss template
protected
string
$typesTemplate
Methods
__construct()
SchemaFactory constructor.
public
__construct() : mixed
generateSchema()
Generate the Schema xml
public
generateSchema() : DBHTMLText
Return values
DBHTMLTextgetBaseTemplatePath()
Retrieve the base template path for a type (extra or schema)
public
getBaseTemplatePath( $type) : string|bool
Parameters
Return values
string|boolgetClassID()
Get the Identifier Field for Solr
public
getClassID() : string
Return values
stringgetCopyFieldDefinitions()
Get the definition of a copy field for determining what to load in to Solr
public
getCopyFieldDefinitions() : ArrayList
Tags
Return values
ArrayListgetCopyFields()
Get the fields that should be copied
public
getCopyFields() : ArrayList
Return values
ArrayListgetDefaultField()
Get the default field to generate df components for
public
getDefaultField() : string|array<string|int, mixed>
Return values
string|array<string|int, mixed>getExtrasPath()
Get any the template path for anything that needs loading in to Solr
public
getExtrasPath() : string
Return values
stringgetFilterFieldDefinitions()
Get the definitions of a filter field to load in to Solr.
public
getFilterFieldDefinitions() : ArrayList
Tags
Return values
ArrayListgetFulltextFieldDefinitions()
Get all fulltext field definitions that are loaded
public
getFulltextFieldDefinitions() : ArrayList
Tags
Return values
ArrayListgetIDField()
Get the Identifier Field for Solr
public
getIDField() : string
Return values
stringgetIndex()
Get the Index that's being used
public
getIndex() : BaseIndex
Return values
BaseIndexgetIndexName()
Get the name of the index being used
public
getIndexName() : string
Return values
stringgetTemplate()
Get the base template for the schema xml
public
getTemplate() : string
Return values
stringgetTemplatePathFor()
Get the base path of the template given, e.g. the "schema" templates or the "extra" templates.
public
getTemplatePathFor(string $type) : string
Parameters
- $type : string
-
What type of templates do we need to get
Return values
stringgetTypes()
Get the types template in a rendered state
public
getTypes() : DBHTMLText
Return values
DBHTMLTextgetTypesTemplate()
Get the types template if defined
public
getTypesTemplate() : string
Return values
stringsetBaseTemplatePath()
Set the base template path for a type (extra or schema)
public
setBaseTemplatePath(string $baseTemplatePath, string $type) : SchemaFactory
Parameters
- $baseTemplatePath : string
- $type : string
Return values
SchemaFactorysetIndex()
Set the index that's being used and add the introspection for it
public
setIndex(BaseIndex $index) : SchemaFactory
Parameters
- $index : BaseIndex
Return values
SchemaFactorysetStore()
Set the store value
public
setStore(bool $store) : void
Parameters
- $store : bool
setTemplate()
Set a custom template for schema xml
public
setTemplate(string $template) : SchemaFactory
Parameters
- $template : string
Return values
SchemaFactorysetTypesTemplate()
Set custom types template
public
setTypesTemplate(string $typesTemplate) : SchemaFactory
Parameters
- $typesTemplate : string
Return values
SchemaFactorygetFieldDefinition()
Get the field definition for a single field
protected
getFieldDefinition( $fieldName, ArrayList &$return[, null|string $copyField = null ]) : mixed
Parameters
Tags
getStoreFields()
Get the stored fields. This includes boosted and faceted fields
protected
getStoreFields() : array<string|int, mixed>