SilverStripe solr Search

DataResolver
in package
Uses DataResolveTrait

Class DataResolver

Table of Contents

Properties

$columnName  : mixed|string|null
Column to resolve
$columns  : array<string|int, mixed>
Columns to resolve
$component  : DataObject|ArrayList|SS_List|DBField
Component to resolve
$shortName  : string
ShortName of a class
$objTypes  : array<string|int, mixed>
Supported object types

Methods

__construct()  : mixed
DataResolver constructor.
identify()  : mixed
Identify the given object's columns
cannotIdentifyException()  : void
An error occured, so log it
checkHasMethod()  : null|mixed|string
Check if a component has the method instead of it being a property
getFieldValue()  : mixed
Get the value for a field
getMethodValue()  : mixed
Get the value for a method
resolveArrayData()  : mixed
Resolves an ArrayData value
resolveDataObject()  : mixed
Resolves a DataObject value
resolveField()  : mixed
Resolves a Single field in the database.
resolveList()  : array<string|int, mixed>|mixed
Resolves a DataList values

Properties

$columnName

Column to resolve

protected mixed|string|null $columnName = ''

$columns

Columns to resolve

protected array<string|int, mixed> $columns = []

$component

Component to resolve

protected DataObject|ArrayList|SS_List|DBField $component

$objTypes

Supported object types

private static array<string|int, mixed> $objTypes = [\SilverStripe\ORM\DataObject::class => 'DataObject', \SilverStripe\View\ArrayData::class => 'ArrayData', \SilverStripe\ORM\SS_List::class => 'List', \SilverStripe\ORM\FieldType\DBField::class => 'Field']

map of objects to methods

Methods

__construct()

DataResolver constructor.

public __construct(DataObject|ArrayList|SS_List|DBField $component[, array<string|int, mixed>|string $columns = [] ]) : mixed
Parameters
$component : DataObject|ArrayList|SS_List|DBField
$columns : array<string|int, mixed>|string = []

identify()

Identify the given object's columns

public static identify(DataObject|ArrayData|SS_List|DBField $obj[, array<string|int, mixed>|string $columns = [] ]) : mixed
Parameters
$obj : DataObject|ArrayData|SS_List|DBField
$columns : array<string|int, mixed>|string = []
Tags
throws
LogicException

cannotIdentifyException()

An error occured, so log it

protected cannotIdentifyException(DataObject|ArrayData|SS_List $component[, array<string|int, mixed> $columns = [] ]) : void
Parameters
$component : DataObject|ArrayData|SS_List
$columns : array<string|int, mixed> = []
Tags
throws
LogicException

checkHasMethod()

Check if a component has the method instead of it being a property

protected checkHasMethod() : null|mixed|string
Tags
throws
LogicException
Return values
null|mixed|string

getFieldValue()

Get the value for a field

protected getFieldValue() : mixed

getMethodValue()

Get the value for a method

protected getMethodValue() : mixed

resolveArrayData()

Resolves an ArrayData value

protected resolveArrayData() : mixed
Tags
throws
LogicException

resolveDataObject()

Resolves a DataObject value

protected resolveDataObject() : mixed
Tags
throws
LogicException

resolveField()

Resolves a Single field in the database.

protected resolveField() : mixed
Tags
throws
LogicException

resolveList()

Resolves a DataList values

protected resolveList() : array<string|int, mixed>|mixed
Tags
throws
LogicException
Return values
array<string|int, mixed>|mixed

        
On this page

Search results