16 lines
358 B
PHP
16 lines
358 B
PHP
<?php
|
|
|
|
namespace Ulmus\Query;
|
|
|
|
abstract class Fragment {
|
|
|
|
public int $order = 0;
|
|
|
|
public abstract function render() : string;
|
|
|
|
protected function renderSegments(array $segments, string $glue = " ") : string
|
|
{
|
|
return implode($glue, array_filter($segments, function($i) { return ! is_null($i) && $i !== false && $i !== ""; }));
|
|
}
|
|
}
|