flux-querybuilder/src/Function/Base.php
davidarendsen 1922f33c5c Add more helper methods to KeyValue expression
Signed-off-by: davidarendsen <davidarendsen@hey.com>
2022-08-10 13:31:08 +00:00

24 lines
No EOL
472 B
PHP

<?php
namespace Arendsen\FluxQueryBuilder\Function;
abstract class Base {
/**
* @throws FunctionNotImplementedException
*/
public function __toString()
{
throw new FunctionNotImplementedException('__toString', get_class($this));
}
protected function format(array $settings)
{
array_walk($settings, function(&$value, $key) {
$value = $key . ': ' . (is_string($value) ? '"' . $value . '"' : $value);
});
return $settings;
}
}