Sort.php 435 B

123456789101112131415161718192021222324
  1. <?php
  2. /**
  3. * @file
  4. * Sort.php
  5. *
  6. * @author: marand
  7. *
  8. * @license General Public License version 2 or later
  9. */
  10. namespace OSInet\Sort;
  11. abstract class Sort implements SortInterface {
  12. /**
  13. * {@inheritdoc}
  14. */
  15. public static function create($type) {
  16. $namespace = __NAMESPACE__;
  17. $class = $namespace . '\\' . ucfirst($type) . "Sort";
  18. $ret = class_exists($class, true) ? new $class() : false;
  19. return $ret;
  20. }
  21. }