From 54b5532de15cdd54816563bee0a0032cdef9eb60 Mon Sep 17 00:00:00 2001 From: Awilum Date: Wed, 2 Sep 2020 19:52:35 +0300 Subject: [PATCH] refactor(core): Remove App from all core namespaces #469 --- .../{app => }/Endpoints/Utils/access.php | 0 .../{app => }/Endpoints/Utils/errors.php | 0 src/flextype/{app => }/Endpoints/entries.php | 0 src/flextype/{app => }/Endpoints/files.php | 0 src/flextype/{app => }/Endpoints/folders.php | 0 src/flextype/{app => }/Endpoints/images.php | 0 src/flextype/{app => }/Endpoints/registry.php | 0 src/flextype/{app => }/Foundation/Cors.php | 2 +- .../{app => }/Foundation/Entries/Entries.php | 4 +-- .../Entries/Fields/CreatedAtField.php | 0 .../Entries/Fields/CreatedByField.php | 0 .../Foundation/Entries/Fields/IdField.php | 0 .../Entries/Fields/ModifiedAtField.php | 0 .../Entries/Fields/ParsersField.php | 0 .../Entries/Fields/PublishedAtField.php | 0 .../Entries/Fields/PublishedByField.php | 0 .../Entries/Fields/RoutableField.php | 0 .../Foundation/Entries/Fields/SlugField.php | 1 + .../Foundation/Entries/Fields/UuidField.php | 0 .../Entries/Fields/VisibilityField.php | 0 .../{app => }/Foundation/Flextype.php | 2 +- .../{app => }/Foundation/Media/MediaFiles.php | 2 +- .../Foundation/Media/MediaFilesMeta.php | 2 +- .../Foundation/Media/MediaFolders.php | 2 +- .../Foundation/Media/MediaFoldersMeta.php | 2 +- src/flextype/{app => }/Foundation/Plugins.php | 2 +- src/flextype/{app => }/Support/Collection.php | 2 +- .../Support/Helpers/CollectionHelper.php | 2 +- .../Support/Helpers/FinderHelper.php | 0 .../Support/Helpers/FlextypeHelper.php | 2 +- .../{app => }/Support/Parsers/Markdown.php | 2 +- .../{app => }/Support/Parsers/Shortcode.php | 2 +- .../Parsers/Shortcodes/EntriesShortcode.php | 0 .../Parsers/Shortcodes/RawShortcode.php | 0 .../Parsers/Shortcodes/RegistryShortcode.php | 0 .../Parsers/Shortcodes/UrlShortcode.php | 0 .../Support/Serializers/Frontmatter.php | 2 +- .../{app => }/Support/Serializers/Json.php | 2 +- .../{app => }/Support/Serializers/Yaml.php | 2 +- src/flextype/bootstrap.php | 26 +++++++++---------- src/flextype/dependencies.php | 24 ++++++++--------- 41 files changed, 43 insertions(+), 42 deletions(-) rename src/flextype/{app => }/Endpoints/Utils/access.php (100%) rename src/flextype/{app => }/Endpoints/Utils/errors.php (100%) rename src/flextype/{app => }/Endpoints/entries.php (100%) rename src/flextype/{app => }/Endpoints/files.php (100%) rename src/flextype/{app => }/Endpoints/folders.php (100%) rename src/flextype/{app => }/Endpoints/images.php (100%) rename src/flextype/{app => }/Endpoints/registry.php (100%) rename src/flextype/{app => }/Foundation/Cors.php (98%) rename src/flextype/{app => }/Foundation/Entries/Entries.php (99%) rename src/flextype/{app => }/Foundation/Entries/Fields/CreatedAtField.php (100%) rename src/flextype/{app => }/Foundation/Entries/Fields/CreatedByField.php (100%) rename src/flextype/{app => }/Foundation/Entries/Fields/IdField.php (100%) rename src/flextype/{app => }/Foundation/Entries/Fields/ModifiedAtField.php (100%) rename src/flextype/{app => }/Foundation/Entries/Fields/ParsersField.php (100%) rename src/flextype/{app => }/Foundation/Entries/Fields/PublishedAtField.php (100%) rename src/flextype/{app => }/Foundation/Entries/Fields/PublishedByField.php (100%) rename src/flextype/{app => }/Foundation/Entries/Fields/RoutableField.php (100%) rename src/flextype/{app => }/Foundation/Entries/Fields/SlugField.php (99%) rename src/flextype/{app => }/Foundation/Entries/Fields/UuidField.php (100%) rename src/flextype/{app => }/Foundation/Entries/Fields/VisibilityField.php (100%) rename src/flextype/{app => }/Foundation/Flextype.php (98%) rename src/flextype/{app => }/Foundation/Media/MediaFiles.php (99%) rename src/flextype/{app => }/Foundation/Media/MediaFilesMeta.php (98%) rename src/flextype/{app => }/Foundation/Media/MediaFolders.php (99%) rename src/flextype/{app => }/Foundation/Media/MediaFoldersMeta.php (92%) rename src/flextype/{app => }/Foundation/Plugins.php (99%) rename src/flextype/{app => }/Support/Collection.php (99%) rename src/flextype/{app => }/Support/Helpers/CollectionHelper.php (99%) rename src/flextype/{app => }/Support/Helpers/FinderHelper.php (100%) rename src/flextype/{app => }/Support/Helpers/FlextypeHelper.php (93%) rename src/flextype/{app => }/Support/Parsers/Markdown.php (97%) rename src/flextype/{app => }/Support/Parsers/Shortcode.php (98%) rename src/flextype/{app => }/Support/Parsers/Shortcodes/EntriesShortcode.php (100%) rename src/flextype/{app => }/Support/Parsers/Shortcodes/RawShortcode.php (100%) rename src/flextype/{app => }/Support/Parsers/Shortcodes/RegistryShortcode.php (100%) rename src/flextype/{app => }/Support/Parsers/Shortcodes/UrlShortcode.php (100%) rename src/flextype/{app => }/Support/Serializers/Frontmatter.php (98%) rename src/flextype/{app => }/Support/Serializers/Json.php (98%) rename src/flextype/{app => }/Support/Serializers/Yaml.php (99%) diff --git a/src/flextype/app/Endpoints/Utils/access.php b/src/flextype/Endpoints/Utils/access.php similarity index 100% rename from src/flextype/app/Endpoints/Utils/access.php rename to src/flextype/Endpoints/Utils/access.php diff --git a/src/flextype/app/Endpoints/Utils/errors.php b/src/flextype/Endpoints/Utils/errors.php similarity index 100% rename from src/flextype/app/Endpoints/Utils/errors.php rename to src/flextype/Endpoints/Utils/errors.php diff --git a/src/flextype/app/Endpoints/entries.php b/src/flextype/Endpoints/entries.php similarity index 100% rename from src/flextype/app/Endpoints/entries.php rename to src/flextype/Endpoints/entries.php diff --git a/src/flextype/app/Endpoints/files.php b/src/flextype/Endpoints/files.php similarity index 100% rename from src/flextype/app/Endpoints/files.php rename to src/flextype/Endpoints/files.php diff --git a/src/flextype/app/Endpoints/folders.php b/src/flextype/Endpoints/folders.php similarity index 100% rename from src/flextype/app/Endpoints/folders.php rename to src/flextype/Endpoints/folders.php diff --git a/src/flextype/app/Endpoints/images.php b/src/flextype/Endpoints/images.php similarity index 100% rename from src/flextype/app/Endpoints/images.php rename to src/flextype/Endpoints/images.php diff --git a/src/flextype/app/Endpoints/registry.php b/src/flextype/Endpoints/registry.php similarity index 100% rename from src/flextype/app/Endpoints/registry.php rename to src/flextype/Endpoints/registry.php diff --git a/src/flextype/app/Foundation/Cors.php b/src/flextype/Foundation/Cors.php similarity index 98% rename from src/flextype/app/Foundation/Cors.php rename to src/flextype/Foundation/Cors.php index 666b8d2c..dd1381e9 100644 --- a/src/flextype/app/Foundation/Cors.php +++ b/src/flextype/Foundation/Cors.php @@ -7,7 +7,7 @@ declare(strict_types=1); * Founded by Sergey Romanenko and maintained by Flextype Community. */ -namespace Flextype\App\Foundation; +namespace Flextype\Foundation; use function count; use function implode; diff --git a/src/flextype/app/Foundation/Entries/Entries.php b/src/flextype/Foundation/Entries/Entries.php similarity index 99% rename from src/flextype/app/Foundation/Entries/Entries.php rename to src/flextype/Foundation/Entries/Entries.php index f9d09da5..f1903f6f 100755 --- a/src/flextype/app/Foundation/Entries/Entries.php +++ b/src/flextype/Foundation/Entries/Entries.php @@ -7,7 +7,7 @@ declare(strict_types=1); * Founded by Sergey Romanenko and maintained by Flextype Community. */ -namespace Flextype\App\Foundation\Entries; +namespace Flextype\Foundation\Entries; use Flextype\Component\Filesystem\Filesystem; use function array_merge; @@ -36,7 +36,7 @@ class Entries * @var array * @access private */ - private $entry = []; + public $entry = []; /** * Current entry create data array diff --git a/src/flextype/app/Foundation/Entries/Fields/CreatedAtField.php b/src/flextype/Foundation/Entries/Fields/CreatedAtField.php similarity index 100% rename from src/flextype/app/Foundation/Entries/Fields/CreatedAtField.php rename to src/flextype/Foundation/Entries/Fields/CreatedAtField.php diff --git a/src/flextype/app/Foundation/Entries/Fields/CreatedByField.php b/src/flextype/Foundation/Entries/Fields/CreatedByField.php similarity index 100% rename from src/flextype/app/Foundation/Entries/Fields/CreatedByField.php rename to src/flextype/Foundation/Entries/Fields/CreatedByField.php diff --git a/src/flextype/app/Foundation/Entries/Fields/IdField.php b/src/flextype/Foundation/Entries/Fields/IdField.php similarity index 100% rename from src/flextype/app/Foundation/Entries/Fields/IdField.php rename to src/flextype/Foundation/Entries/Fields/IdField.php diff --git a/src/flextype/app/Foundation/Entries/Fields/ModifiedAtField.php b/src/flextype/Foundation/Entries/Fields/ModifiedAtField.php similarity index 100% rename from src/flextype/app/Foundation/Entries/Fields/ModifiedAtField.php rename to src/flextype/Foundation/Entries/Fields/ModifiedAtField.php diff --git a/src/flextype/app/Foundation/Entries/Fields/ParsersField.php b/src/flextype/Foundation/Entries/Fields/ParsersField.php similarity index 100% rename from src/flextype/app/Foundation/Entries/Fields/ParsersField.php rename to src/flextype/Foundation/Entries/Fields/ParsersField.php diff --git a/src/flextype/app/Foundation/Entries/Fields/PublishedAtField.php b/src/flextype/Foundation/Entries/Fields/PublishedAtField.php similarity index 100% rename from src/flextype/app/Foundation/Entries/Fields/PublishedAtField.php rename to src/flextype/Foundation/Entries/Fields/PublishedAtField.php diff --git a/src/flextype/app/Foundation/Entries/Fields/PublishedByField.php b/src/flextype/Foundation/Entries/Fields/PublishedByField.php similarity index 100% rename from src/flextype/app/Foundation/Entries/Fields/PublishedByField.php rename to src/flextype/Foundation/Entries/Fields/PublishedByField.php diff --git a/src/flextype/app/Foundation/Entries/Fields/RoutableField.php b/src/flextype/Foundation/Entries/Fields/RoutableField.php similarity index 100% rename from src/flextype/app/Foundation/Entries/Fields/RoutableField.php rename to src/flextype/Foundation/Entries/Fields/RoutableField.php diff --git a/src/flextype/app/Foundation/Entries/Fields/SlugField.php b/src/flextype/Foundation/Entries/Fields/SlugField.php similarity index 99% rename from src/flextype/app/Foundation/Entries/Fields/SlugField.php rename to src/flextype/Foundation/Entries/Fields/SlugField.php index 345153a0..19fd80ee 100644 --- a/src/flextype/app/Foundation/Entries/Fields/SlugField.php +++ b/src/flextype/Foundation/Entries/Fields/SlugField.php @@ -9,6 +9,7 @@ declare(strict_types=1); if (flextype('registry')->get('flextype.settings.entries.fields.slug.enabled')) { flextype('emitter')->addListener('onEntryAfterInitialized', static function () : void { + $parts = explode('/', ltrim(rtrim(flextype('entries')->entry_id, '/'), '/')); flextype('entries')->entry['slug'] = isset(flextype('entries')->entry['slug']) ? (string) flextype('entries')->entry['slug'] : (string) end($parts); }); diff --git a/src/flextype/app/Foundation/Entries/Fields/UuidField.php b/src/flextype/Foundation/Entries/Fields/UuidField.php similarity index 100% rename from src/flextype/app/Foundation/Entries/Fields/UuidField.php rename to src/flextype/Foundation/Entries/Fields/UuidField.php diff --git a/src/flextype/app/Foundation/Entries/Fields/VisibilityField.php b/src/flextype/Foundation/Entries/Fields/VisibilityField.php similarity index 100% rename from src/flextype/app/Foundation/Entries/Fields/VisibilityField.php rename to src/flextype/Foundation/Entries/Fields/VisibilityField.php diff --git a/src/flextype/app/Foundation/Flextype.php b/src/flextype/Foundation/Flextype.php similarity index 98% rename from src/flextype/app/Foundation/Flextype.php rename to src/flextype/Foundation/Flextype.php index a1da6427..32516db7 100644 --- a/src/flextype/app/Foundation/Flextype.php +++ b/src/flextype/Foundation/Flextype.php @@ -7,7 +7,7 @@ declare(strict_types=1); * Founded by Sergey Romanenko and maintained by Flextype Community. */ -namespace Flextype\App\Foundation; +namespace Flextype\Foundation; use Slim\App; diff --git a/src/flextype/app/Foundation/Media/MediaFiles.php b/src/flextype/Foundation/Media/MediaFiles.php similarity index 99% rename from src/flextype/app/Foundation/Media/MediaFiles.php rename to src/flextype/Foundation/Media/MediaFiles.php index 42df21f7..a13250c1 100644 --- a/src/flextype/app/Foundation/Media/MediaFiles.php +++ b/src/flextype/Foundation/Media/MediaFiles.php @@ -7,7 +7,7 @@ declare(strict_types=1); * Founded by Sergey Romanenko and maintained by Flextype Community. */ -namespace Flextype\App\Foundation\Media; +namespace Flextype\Foundation\Media; use Flextype\Component\Filesystem\Filesystem; use Intervention\Image\ImageManagerStatic as Image; diff --git a/src/flextype/app/Foundation/Media/MediaFilesMeta.php b/src/flextype/Foundation/Media/MediaFilesMeta.php similarity index 98% rename from src/flextype/app/Foundation/Media/MediaFilesMeta.php rename to src/flextype/Foundation/Media/MediaFilesMeta.php index d526a3f7..1cfea52a 100644 --- a/src/flextype/app/Foundation/Media/MediaFilesMeta.php +++ b/src/flextype/Foundation/Media/MediaFilesMeta.php @@ -7,7 +7,7 @@ declare(strict_types=1); * Founded by Sergey Romanenko and maintained by Flextype Community. */ -namespace Flextype\App\Foundation\Media; +namespace Flextype\Foundation\Media; use Flextype\Component\Arrays\Arrays; use Flextype\Component\Filesystem\Filesystem; diff --git a/src/flextype/app/Foundation/Media/MediaFolders.php b/src/flextype/Foundation/Media/MediaFolders.php similarity index 99% rename from src/flextype/app/Foundation/Media/MediaFolders.php rename to src/flextype/Foundation/Media/MediaFolders.php index 63a84d9a..a2d5665c 100644 --- a/src/flextype/app/Foundation/Media/MediaFolders.php +++ b/src/flextype/Foundation/Media/MediaFolders.php @@ -7,7 +7,7 @@ declare(strict_types=1); * Founded by Sergey Romanenko and maintained by Flextype Community. */ -namespace Flextype\App\Foundation\Media; +namespace Flextype\Foundation\Media; use Flextype\Component\Filesystem\Filesystem; use Slim\Http\Environment; diff --git a/src/flextype/app/Foundation/Media/MediaFoldersMeta.php b/src/flextype/Foundation/Media/MediaFoldersMeta.php similarity index 92% rename from src/flextype/app/Foundation/Media/MediaFoldersMeta.php rename to src/flextype/Foundation/Media/MediaFoldersMeta.php index 46031243..519dc5de 100644 --- a/src/flextype/app/Foundation/Media/MediaFoldersMeta.php +++ b/src/flextype/Foundation/Media/MediaFoldersMeta.php @@ -7,7 +7,7 @@ declare(strict_types=1); * Founded by Sergey Romanenko and maintained by Flextype Community. */ -namespace Flextype\App\Foundation\Media; +namespace Flextype\Foundation\Media; class MediaFoldersMeta { diff --git a/src/flextype/app/Foundation/Plugins.php b/src/flextype/Foundation/Plugins.php similarity index 99% rename from src/flextype/app/Foundation/Plugins.php rename to src/flextype/Foundation/Plugins.php index 7b4485de..97dac800 100755 --- a/src/flextype/app/Foundation/Plugins.php +++ b/src/flextype/Foundation/Plugins.php @@ -7,7 +7,7 @@ declare(strict_types=1); * Founded by Sergey Romanenko and maintained by Flextype Community. */ -namespace Flextype\App\Foundation; +namespace Flextype\Foundation; use Composer\Semver\Semver; use Flextype\Component\Arrays\Arrays; diff --git a/src/flextype/app/Support/Collection.php b/src/flextype/Support/Collection.php similarity index 99% rename from src/flextype/app/Support/Collection.php rename to src/flextype/Support/Collection.php index af04dbfc..6c844850 100644 --- a/src/flextype/app/Support/Collection.php +++ b/src/flextype/Support/Collection.php @@ -7,7 +7,7 @@ declare(strict_types=1); * Founded by Sergey Romanenko and maintained by Flextype Community. */ -namespace Flextype\App\Support; +namespace Flextype\Support; use Doctrine\Common\Collections\ArrayCollection; use Doctrine\Common\Collections\Criteria; diff --git a/src/flextype/app/Support/Helpers/CollectionHelper.php b/src/flextype/Support/Helpers/CollectionHelper.php similarity index 99% rename from src/flextype/app/Support/Helpers/CollectionHelper.php rename to src/flextype/Support/Helpers/CollectionHelper.php index be91e798..99179f2c 100644 --- a/src/flextype/app/Support/Helpers/CollectionHelper.php +++ b/src/flextype/Support/Helpers/CollectionHelper.php @@ -7,7 +7,7 @@ declare(strict_types=1); * Founded by Sergey Romanenko and maintained by Flextype Community. */ -use Flextype\App\Support\Collection; +use Flextype\Support\Collection; if (! function_exists('collect')) { /** diff --git a/src/flextype/app/Support/Helpers/FinderHelper.php b/src/flextype/Support/Helpers/FinderHelper.php similarity index 100% rename from src/flextype/app/Support/Helpers/FinderHelper.php rename to src/flextype/Support/Helpers/FinderHelper.php diff --git a/src/flextype/app/Support/Helpers/FlextypeHelper.php b/src/flextype/Support/Helpers/FlextypeHelper.php similarity index 93% rename from src/flextype/app/Support/Helpers/FlextypeHelper.php rename to src/flextype/Support/Helpers/FlextypeHelper.php index 0663f42b..c8f5c0b4 100644 --- a/src/flextype/app/Support/Helpers/FlextypeHelper.php +++ b/src/flextype/Support/Helpers/FlextypeHelper.php @@ -7,7 +7,7 @@ declare(strict_types=1); * Founded by Sergey Romanenko and maintained by Flextype Community. */ -use Flextype\App\Foundation\Flextype; +use Flextype\Foundation\Flextype; if (! function_exists('flextype')) { /** diff --git a/src/flextype/app/Support/Parsers/Markdown.php b/src/flextype/Support/Parsers/Markdown.php similarity index 97% rename from src/flextype/app/Support/Parsers/Markdown.php rename to src/flextype/Support/Parsers/Markdown.php index 81dd0b0d..aa3c9207 100644 --- a/src/flextype/app/Support/Parsers/Markdown.php +++ b/src/flextype/Support/Parsers/Markdown.php @@ -7,7 +7,7 @@ declare(strict_types=1); * Founded by Sergey Romanenko and maintained by Flextype Community. */ -namespace Flextype\App\Support\Parsers; +namespace Flextype\Support\Parsers; use function md5; diff --git a/src/flextype/app/Support/Parsers/Shortcode.php b/src/flextype/Support/Parsers/Shortcode.php similarity index 98% rename from src/flextype/app/Support/Parsers/Shortcode.php rename to src/flextype/Support/Parsers/Shortcode.php index d9937567..858da19a 100644 --- a/src/flextype/app/Support/Parsers/Shortcode.php +++ b/src/flextype/Support/Parsers/Shortcode.php @@ -7,7 +7,7 @@ declare(strict_types=1); * Founded by Sergey Romanenko and maintained by Flextype Community. */ -namespace Flextype\App\Support\Parsers; +namespace Flextype\Support\Parsers; use function md5; diff --git a/src/flextype/app/Support/Parsers/Shortcodes/EntriesShortcode.php b/src/flextype/Support/Parsers/Shortcodes/EntriesShortcode.php similarity index 100% rename from src/flextype/app/Support/Parsers/Shortcodes/EntriesShortcode.php rename to src/flextype/Support/Parsers/Shortcodes/EntriesShortcode.php diff --git a/src/flextype/app/Support/Parsers/Shortcodes/RawShortcode.php b/src/flextype/Support/Parsers/Shortcodes/RawShortcode.php similarity index 100% rename from src/flextype/app/Support/Parsers/Shortcodes/RawShortcode.php rename to src/flextype/Support/Parsers/Shortcodes/RawShortcode.php diff --git a/src/flextype/app/Support/Parsers/Shortcodes/RegistryShortcode.php b/src/flextype/Support/Parsers/Shortcodes/RegistryShortcode.php similarity index 100% rename from src/flextype/app/Support/Parsers/Shortcodes/RegistryShortcode.php rename to src/flextype/Support/Parsers/Shortcodes/RegistryShortcode.php diff --git a/src/flextype/app/Support/Parsers/Shortcodes/UrlShortcode.php b/src/flextype/Support/Parsers/Shortcodes/UrlShortcode.php similarity index 100% rename from src/flextype/app/Support/Parsers/Shortcodes/UrlShortcode.php rename to src/flextype/Support/Parsers/Shortcodes/UrlShortcode.php diff --git a/src/flextype/app/Support/Serializers/Frontmatter.php b/src/flextype/Support/Serializers/Frontmatter.php similarity index 98% rename from src/flextype/app/Support/Serializers/Frontmatter.php rename to src/flextype/Support/Serializers/Frontmatter.php index 37de0f02..28be687b 100644 --- a/src/flextype/app/Support/Serializers/Frontmatter.php +++ b/src/flextype/Support/Serializers/Frontmatter.php @@ -7,7 +7,7 @@ declare(strict_types=1); * Founded by Sergey Romanenko and maintained by Flextype Community. */ -namespace Flextype\App\Support\Serializers; +namespace Flextype\Support\Serializers; use Flextype\Component\Arrays\Arrays; use function array_slice; diff --git a/src/flextype/app/Support/Serializers/Json.php b/src/flextype/Support/Serializers/Json.php similarity index 98% rename from src/flextype/app/Support/Serializers/Json.php rename to src/flextype/Support/Serializers/Json.php index 3c5459d9..1d94ee85 100644 --- a/src/flextype/app/Support/Serializers/Json.php +++ b/src/flextype/Support/Serializers/Json.php @@ -7,7 +7,7 @@ declare(strict_types=1); * Founded by Sergey Romanenko and maintained by Flextype Community. */ -namespace Flextype\App\Support\Serializers; +namespace Flextype\Support\Serializers; use RuntimeException; use function defined; diff --git a/src/flextype/app/Support/Serializers/Yaml.php b/src/flextype/Support/Serializers/Yaml.php similarity index 99% rename from src/flextype/app/Support/Serializers/Yaml.php rename to src/flextype/Support/Serializers/Yaml.php index 41aef24f..545448ce 100644 --- a/src/flextype/app/Support/Serializers/Yaml.php +++ b/src/flextype/Support/Serializers/Yaml.php @@ -7,7 +7,7 @@ declare(strict_types=1); * Founded by Sergey Romanenko and maintained by Flextype Community. */ -namespace Flextype\App\Support\Serializers; +namespace Flextype\Support\Serializers; use RuntimeException; use Symfony\Component\Yaml\Exception\DumpException as SymfonyYamlDumpException; diff --git a/src/flextype/bootstrap.php b/src/flextype/bootstrap.php index d334a7eb..a7de5b7d 100755 --- a/src/flextype/bootstrap.php +++ b/src/flextype/bootstrap.php @@ -9,7 +9,7 @@ declare(strict_types=1); namespace Flextype; -use Flextype\App\Foundation\Flextype; +use Flextype\Foundation\Flextype; use Flextype\Component\Registry\Registry; use Flextype\Component\Session\Session; use Zeuxisoo\Whoops\Provider\Slim\WhoopsMiddleware; @@ -64,13 +64,13 @@ include_once 'dependencies.php'; /** * Include API ENDPOINTS */ -include_once ROOT_DIR . '/src/flextype/app/Endpoints/Utils/errors.php'; -include_once ROOT_DIR . '/src/flextype/app/Endpoints/Utils/access.php'; -include_once ROOT_DIR . '/src/flextype/app/Endpoints/entries.php'; -include_once ROOT_DIR . '/src/flextype/app/Endpoints/registry.php'; -include_once ROOT_DIR . '/src/flextype/app/Endpoints/files.php'; -include_once ROOT_DIR . '/src/flextype/app/Endpoints/folders.php'; -include_once ROOT_DIR . '/src/flextype/app/Endpoints/images.php'; +include_once ROOT_DIR . '/src/flextype/Endpoints/Utils/errors.php'; +include_once ROOT_DIR . '/src/flextype/Endpoints/Utils/access.php'; +include_once ROOT_DIR . '/src/flextype/Endpoints/entries.php'; +include_once ROOT_DIR . '/src/flextype/Endpoints/registry.php'; +include_once ROOT_DIR . '/src/flextype/Endpoints/files.php'; +include_once ROOT_DIR . '/src/flextype/Endpoints/folders.php'; +include_once ROOT_DIR . '/src/flextype/Endpoints/images.php'; /** * Set internal encoding @@ -100,12 +100,12 @@ date_default_timezone_set(flextype('registry')->get('flextype.settings.timezone' /** * Init shortocodes * - * Load Flextype Shortcodes from directory /flextype/app/Support/Parsers/Shortcodes/ based on flextype.settings.shortcode.shortcodes array + * Load Flextype Shortcodes from directory /flextype/Support/Parsers/Shortcodes/ based on flextype.settings.shortcode.shortcodes array */ $shortcodes = flextype('registry')->get('flextype.settings.shortcode.shortcodes'); foreach ($shortcodes as $shortcode_name => $shortcode) { - $shortcode_file_path = ROOT_DIR . '/src/flextype/app/Support/Parsers/Shortcodes/' . str_replace('_', '', ucwords($shortcode_name, '_')) . 'Shortcode.php'; + $shortcode_file_path = ROOT_DIR . '/src/flextype/Support/Parsers/Shortcodes/' . str_replace('_', '', ucwords($shortcode_name, '_')) . 'Shortcode.php'; if (! file_exists($shortcode_file_path)) { continue; } @@ -116,16 +116,16 @@ foreach ($shortcodes as $shortcode_name => $shortcode) { /** * Init entries fields * - * Load Flextype Entries fields from directory /flextype/app/Foundation/Entries/Fields/ based on flextype.settings.entries.fields array + * Load Flextype Entries fields from directory /flextype/Foundation/Entries/Fields/ based on flextype.settings.entries.fields array */ $entry_fields = flextype('registry')->get('flextype.settings.entries.fields'); foreach ($entry_fields as $field_name => $field) { - $entry_field_file_path = ROOT_DIR . '/src/flextype/app/Foundation/Entries/Fields/' . str_replace('_', '', ucwords($field_name, '_')) . 'Field.php'; + $entry_field_file_path = ROOT_DIR . '/src/flextype/Foundation/Entries/Fields/' . str_replace('_', '', ucwords($field_name, '_')) . 'Field.php'; if (! file_exists($entry_field_file_path)) { continue; } - + include_once $entry_field_file_path; } diff --git a/src/flextype/dependencies.php b/src/flextype/dependencies.php index d5517519..f8e87ac6 100644 --- a/src/flextype/dependencies.php +++ b/src/flextype/dependencies.php @@ -12,18 +12,18 @@ namespace Flextype; use Bnf\Slim3Psr15\CallableResolver; use Cocur\Slugify\Slugify; use Flextype\Component\Strings\Strings; -use Flextype\App\Foundation\Cors; -use Flextype\App\Foundation\Entries\Entries; -use Flextype\App\Foundation\Media\MediaFiles; -use Flextype\App\Foundation\Media\MediaFilesMeta; -use Flextype\App\Foundation\Media\MediaFolders; -use Flextype\App\Foundation\Media\MediaFoldersMeta; -use Flextype\App\Foundation\Plugins; -use Flextype\App\Support\Parsers\Markdown; -use Flextype\App\Support\Parsers\Shortcode; -use Flextype\App\Support\Serializers\Frontmatter; -use Flextype\App\Support\Serializers\Json; -use Flextype\App\Support\Serializers\Yaml; +use Flextype\Foundation\Cors; +use Flextype\Foundation\Entries\Entries; +use Flextype\Foundation\Media\MediaFiles; +use Flextype\Foundation\Media\MediaFilesMeta; +use Flextype\Foundation\Media\MediaFolders; +use Flextype\Foundation\Media\MediaFoldersMeta; +use Flextype\Foundation\Plugins; +use Flextype\Support\Parsers\Markdown; +use Flextype\Support\Parsers\Shortcode; +use Flextype\Support\Serializers\Frontmatter; +use Flextype\Support\Serializers\Json; +use Flextype\Support\Serializers\Yaml; use Intervention\Image\ImageManager; use League\Event\Emitter; use League\Flysystem\Adapter\Local;