Source of file Field.php
Size: 1,735 Bytes - Last Modified: 2021-12-23T10:34:25+00:00
/var/www/docs.ssmods.com/process/src/src/Schema/Field.php
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091 | <?php namespace SilverStripe\SearchService\Schema; class Field { /** * @var string */ private $searchFieldName; /** * @var string|null */ private $property; /** * @var array */ private $options = []; /** * Field constructor. * @param string $searchFieldName * @param string|null $property * @param array $options */ public function __construct(string $searchFieldName, ?string $property = null, array $options = []) { $this->searchFieldName = $searchFieldName; $this->property = $property; $this->options = $options; } /** * @return string */ public function getSearchFieldName(): string { return $this->searchFieldName; } /** * @param string $searchFieldName * @return Field */ public function setSearchFieldName(string $searchFieldName): Field { $this->searchFieldName = $searchFieldName; return $this; } /** * @return string|null */ public function getProperty(): ?string { return $this->property; } /** * @param string|null $property * @return Field */ public function setProperty(?string $property): Field { $this->property = $property; return $this; } /** * @param string $key * @return mixed|null */ public function getOption(string $key) { return $this->options[$key] ?? null; } /** * @param string $key * @param $value * @return Field */ public function setOption(string $key, $value): Field { $this->options[$key] = $value; return $this; } } |