Creates a comparator for constants
public static createConstantComparator ( string $type ) : phootwork\lang\Comparator | ||
$type | string | |
리턴 | phootwork\lang\Comparator |
private function sortConstants(ConstantsInterface $model) { if ($this->config->isSortingEnabled() && ($constantSorting = $this->config->getConstantSorting()) !== false) { if (is_string($constantSorting)) { $constantSorting = ComparatorFactory::createConstantComparator($constantSorting); } $model->getConstants()->sort($constantSorting); } }