createMethodComparator() public static method

Creates a comparator for methods
public static createMethodComparator ( string $type ) : phootwork\lang\Comparator
$type string
return phootwork\lang\Comparator
Ejemplo n.º 1
0
 private function sortMethods(AbstractPhpStruct $model)
 {
     if ($this->config->isSortingEnabled() && ($methodSorting = $this->config->getMethodSorting()) !== false) {
         if (is_string($methodSorting)) {
             $methodSorting = ComparatorFactory::createMethodComparator($methodSorting);
         }
         $model->getMethods()->sort($methodSorting);
     }
 }