diff --git a/app/Helpers/PageSorter.php b/app/Helpers/PageSorter.php index 874deef..d439057 100644 --- a/app/Helpers/PageSorter.php +++ b/app/Helpers/PageSorter.php @@ -1,6 +1,10 @@ loadAllPages(); + echo(count($pages)); } diff --git a/app/Helpers/StringHelpers.php b/app/Helpers/StringHelpers.php index 04a646f..d674b2c 100644 --- a/app/Helpers/StringHelpers.php +++ b/app/Helpers/StringHelpers.php @@ -1,6 +1,42 @@ app->bind(StringService::class, function ($app) { - return new StringService(); - }); - $this->app->bind(DocService::class, function ($app) { return new DocService(); }); @@ -62,7 +57,6 @@ class FipamoServiceProvider extends ServiceProvider new SortingService( new SettingsService(new DocService(), new ContentService()), new ContentService(), - new StringService(), new ThemeService(new SettingsService(new DocService(), new ContentService())) ), new SettingsService(new DocService(), new ContentService()), @@ -74,7 +68,6 @@ class FipamoServiceProvider extends ServiceProvider return new SortingService( new SettingsService(new DocService(), new ContentService()), new ContentService(), - new StringService(), new ThemeService(new SettingsService(new DocService(), new ContentService())) ); }); diff --git a/app/Services/ContentService.php b/app/Services/ContentService.php index c4be81b..2199b57 100644 --- a/app/Services/ContentService.php +++ b/app/Services/ContentService.php @@ -192,4 +192,9 @@ class ContentService $sorted->values()->all(); return $sorted; } + + public static function getAll() + { + echo("YES"); + } } diff --git a/app/Services/SortingService.php b/app/Services/SortingService.php index c9116b0..c0a6d09 100644 --- a/app/Services/SortingService.php +++ b/app/Services/SortingService.php @@ -13,18 +13,15 @@ class SortingService private $p_archive = []; private $settings; private $contents; - private $strings; private $themes; public function __construct( SettingsService $settingsService, ContentService $contentService, - StringService $stringService, ThemeService $themeService, ) { $this->settings = $settingsService; $this->contents = $contentService; - $this->strings = $stringService; $this->themes = $themeService; } @@ -40,7 +37,7 @@ class SortingService if (!find($this->p_tags, ['tag_name' => $label])) { array_push($this->p_tags, [ 'tag_name' => $label, - 'slug' => $this->strings::safeString($label), + 'slug' => safeString($label), 'pages' => $this->tagPages($label, $pages), ]); } @@ -178,7 +175,7 @@ class SortingService $label = trim($tag); array_push($tags, [ 'label' => $label . ' ', - 'slug' => $this->strings->safeString($label), + 'slug' => safeString($label), ]); } } diff --git a/app/Services/StringService.php b/app/Services/StringService.php deleted file mode 100644 index 23a97bb..0000000 --- a/app/Services/StringService.php +++ /dev/null @@ -1,51 +0,0 @@ -