Skip to content

Commit 590b1bc

Browse files
authored
Merge pull request #1919 from hydephp/hyde-facade-mixins
Update the Hyde facade to use a mixin annotation instead of method annotations
2 parents 1cd0678 + 7d3af56 commit 590b1bc

File tree

2 files changed

+2
-53
lines changed

2 files changed

+2
-53
lines changed

RELEASE_NOTES.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ This serves two purposes:
1616
- All page types now support the `description` front matter field (used in page metadata) in https://github.com/hydephp/develop/pull/1884
1717

1818
### Changed
19+
- Changed the `Hyde` facade to use a `@mixin` annotation instead of single method annotations in https://github.com/hydephp/develop/pull/1919
1920
- Updated the `Serializable` trait to provide a default automatic `toArray` method in https://github.com/hydephp/develop/pull/1791
2021
- Updated the `PostAuthor` class's `name` property to fall back to the `username` property if the `name` property is not set in https://github.com/hydephp/develop/pull/1794
2122
- Removed the nullable type hint from the `PostAuthor` class's `name` property as it is now always set in https://github.com/hydephp/develop/pull/1794

packages/framework/src/Hyde.php

Lines changed: 1 addition & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,8 @@
44

55
namespace Hyde;
66

7-
use Hyde\Enums\Feature;
8-
use Hyde\Facades\Features;
97
use Hyde\Foundation\HydeKernel;
10-
use Hyde\Foundation\Kernel\FileCollection;
11-
use Hyde\Foundation\Kernel\Filesystem;
12-
use Hyde\Foundation\Kernel\PageCollection;
13-
use Hyde\Foundation\Kernel\RouteCollection;
14-
use Hyde\Pages\Concerns\HydePage;
15-
use Hyde\Support\Models\Route;
168
use Illuminate\Support\Facades\Facade;
17-
use Illuminate\Support\HtmlString;
189
use JetBrains\PhpStorm\Pure;
1910

2011
/**
@@ -26,50 +17,7 @@
2617
* @copyright 2022 Caen De Silva
2718
* @license MIT License
2819
*
29-
* @method static string path(string $path = '')
30-
* @method static string vendorPath(string $path = '', string $package = 'framework')
31-
* @method static string pathToAbsolute(string $path)
32-
* @method static string pathToRelative(string $path)
33-
* @method static string sitePath(string $path = '')
34-
* @method static string mediaPath(string $path = '')
35-
* @method static string siteMediaPath(string $path = '')
36-
* @method static string formatLink(string $destination)
37-
* @method static string relativeLink(string $destination)
38-
* @method static string mediaLink(string $destination, bool $validate = false)
39-
* @method static string asset(string $name, bool $preferQualifiedUrl = false)
40-
* @method static string url(string $path = '')
41-
* @method static Route|null route(string $key)
42-
* @method static string makeTitle(string $value)
43-
* @method static string normalizeNewlines(string $string)
44-
* @method static string stripNewlines(string $string)
45-
* @method static string trimSlashes(string $string)
46-
* @method static HtmlString markdown(string $text, bool $stripIndentation = false)
47-
* @method static string currentPage()
48-
* @method static string currentRouteKey()
49-
* @method static string getBasePath()
50-
* @method static string getSourceRoot()
51-
* @method static string getOutputDirectory()
52-
* @method static string getMediaDirectory()
53-
* @method static string getMediaOutputDirectory()
54-
* @method static Features features()
55-
* @method static FileCollection files()
56-
* @method static PageCollection pages()
57-
* @method static RouteCollection routes()
58-
* @method static Route|null currentRoute()
59-
* @method static HydeKernel getInstance()
60-
* @method static Filesystem filesystem()
61-
* @method static array getRegisteredExtensions()
62-
* @method static bool hasFeature(Feature $feature)
63-
* @method static bool hasSiteUrl()
64-
* @method static void setInstance(HydeKernel $instance)
65-
* @method static void setBasePath(string $basePath)
66-
* @method static void setOutputDirectory(string $outputDirectory)
67-
* @method static void setMediaDirectory(string $mediaDirectory)
68-
* @method static void setSourceRoot(string $sourceRoot)
69-
* @method static void shareViewData(HydePage $page)
70-
* @method static array toArray()
71-
* @method static bool isBooted()
72-
* @method static void boot()
20+
* @mixin \Hyde\Foundation\HydeKernel
7321
*
7422
* @see \Hyde\Foundation\Concerns\ForwardsFilesystem
7523
* @see \Hyde\Foundation\Concerns\ForwardsHyperlinks

0 commit comments

Comments
 (0)