1<?php 2 3namespace dokuwiki\plugin\yearbox\services\pageNameStrategies; 4 5abstract class PageNameStrategy 6{ 7 8 public static function getPagenameStategy($namingStructure) 9 { 10 switch ($namingStructure) { 11 case 'separatedCompletely': 12 case 2: 13 return new CompletelySeparated(); 14 case 'YearMonthSeperatedNS': 15 case 1: 16 return new YearMonthSeperatedNS(); 17 case 'YearNS': 18 return new YearNS(); 19 default: 20 return new YearMonthCombinedNS(); 21 } 22 } 23 24 abstract public function getPageId($baseNS, $year, $month, $day, $name); 25} 26