Source of file SearchVariant_Caller.php
Size: 0,694 Bytes - Last Modified: 2021-12-23T10:31:32+00:00
/var/www/docs.ssmods.com/process/src/src/Search/Variants/SearchVariant_Caller.php
123456789101112131415161718192021222324252627282930313233 | <?php namespace SilverStripe\FullTextSearch\Search\Variants; /** * Internal utility class used to hold the state of the SearchVariant::with call */ class SearchVariant_Caller { protected $variants = null; public function __construct($variants) { $this->variants = $variants; } public function call($method, &...$args) { $values = array(); foreach ($this->variants as $variant) { if (method_exists($variant, $method)) { $value = $variant->$method(...$args); if ($value !== null) { $values[] = $value; } } } return $values; } } |