| 1 |  |  | <?php | 
            
                                                                                                            
                            
            
                                    
            
            
                | 2 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 3 |  |  | namespace Hyde\Framework; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 4 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 5 |  |  | use Hyde\Framework\Contracts\HydeKernelContract; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 6 |  |  | use Hyde\Framework\Contracts\RouteContract; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 7 |  |  | use Hyde\Framework\Helpers\Features; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 8 |  |  | use Illuminate\Support\Facades\Facade; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 9 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 10 |  |  | /** | 
            
                                                                                                            
                            
            
                                    
            
            
                | 11 |  |  |  * General facade for Hyde services. | 
            
                                                                                                            
                            
            
                                    
            
            
                | 12 |  |  |  * | 
            
                                                                                                            
                            
            
                                    
            
            
                | 13 |  |  |  * @see \Hyde\Framework\HydeKernel | 
            
                                                                                                            
                            
            
                                    
            
            
                | 14 |  |  |  * | 
            
                                                                                                            
                            
            
                                    
            
            
                | 15 |  |  |  * @author  Caen De Silva <[email protected]> | 
            
                                                                                                            
                            
            
                                    
            
            
                | 16 |  |  |  * @copyright 2022 Caen De Silva | 
            
                                                                                                            
                            
            
                                    
            
            
                | 17 |  |  |  * @license MIT License | 
            
                                                                                                            
                            
            
                                    
            
            
                | 18 |  |  |  * | 
            
                                                                                                            
                            
            
                                    
            
            
                | 19 |  |  |  * @link https://hydephp.com/ | 
            
                                                                                                            
                            
            
                                    
            
            
                | 20 |  |  |  * | 
            
                                                                                                            
                            
            
                                    
            
            
                | 21 |  |  |  * @method static string vendorPath(string $path = '') | 
            
                                                                                                            
                            
            
                                    
            
            
                | 22 |  |  |  * @method static string getMarkdownPagePath(string $path = '') | 
            
                                                                                                            
                            
            
                                    
            
            
                | 23 |  |  |  * @method static string getSiteOutputPath(string $path = '') | 
            
                                                                                                            
                            
            
                                    
            
            
                | 24 |  |  |  * @method static string getBladePagePath(string $path = '') | 
            
                                                                                                            
                            
            
                                    
            
            
                | 25 |  |  |  * @method static string pathToRelative(string $path) | 
            
                                                                                                            
                            
            
                                    
            
            
                | 26 |  |  |  * @method static Features features() | 
            
                                                                                                            
                            
            
                                    
            
            
                | 27 |  |  |  * @method static bool hasFeature(string $feature) | 
            
                                                                                                            
                            
            
                                    
            
            
                | 28 |  |  |  * @method static string path(string $path = '') | 
            
                                                                                                            
                            
            
                                    
            
            
                | 29 |  |  |  * @method static string relativeLink(string $destination) | 
            
                                                                                                            
                            
            
                                    
            
            
                | 30 |  |  |  * @method static string getMarkdownPostPath(string $path = '') | 
            
                                                                                                            
                            
            
                                    
            
            
                | 31 |  |  |  * @method static bool|int copy(string $from, string $to, bool $force = false) | 
            
                                                                                                            
                            
            
                                    
            
            
                | 32 |  |  |  * @method static string getModelSourcePath(string $model, string $path = '') | 
            
                                                                                                            
                            
            
                                    
            
            
                | 33 |  |  |  * @method static string image(string $name,  bool $preferQualifiedUrl = false) | 
            
                                                                                                            
                            
            
                                    
            
            
                | 34 |  |  |  * @method static RouteContract|null currentRoute() | 
            
                                                                                                            
                            
            
                                    
            
            
                | 35 |  |  |  * @method static string currentPage() | 
            
                                                                                                            
                            
            
                                    
            
            
                | 36 |  |  |  * @method static string url(string $path = '', null|string $default = null) | 
            
                                                                                                            
                            
            
                                    
            
            
                | 37 |  |  |  * @method static void setBasePath(string $basePath) | 
            
                                                                                                            
                            
            
                                    
            
            
                | 38 |  |  |  * @method static void mixin(object $mixin, bool $replace = true) | 
            
                                                                                                            
                            
            
                                    
            
            
                | 39 |  |  |  * @method static string formatHtmlPath(string $destination) | 
            
                                                                                                            
                            
            
                                    
            
            
                | 40 |  |  |  * @method static string makeTitle(string $slug) | 
            
                                                                                                            
                            
            
                                    
            
            
                | 41 |  |  |  * @method static bool hasSiteUrl() | 
            
                                                                                                            
                            
            
                                    
            
            
                | 42 |  |  |  * @method static string getBasePath() | 
            
                                                                                                            
                            
            
                                    
            
            
                | 43 |  |  |  * @method static HydeKernelContract getInstance() | 
            
                                                                                                            
                            
            
                                    
            
            
                | 44 |  |  |  * @method static string getDocumentationPagePath(string $path = '') | 
            
                                                                                                            
                            
            
                                    
            
            
                | 45 |  |  |  * @method static bool hasMacro(string $name) | 
            
                                                                                                            
                            
            
                                    
            
            
                | 46 |  |  |  * @method static void macro(string $name, callable|object $macro) | 
            
                                                                                                            
                            
            
                                    
            
            
                | 47 |  |  |  * @method static void flushMacros() | 
            
                                                                                                            
                            
            
                                    
            
            
                | 48 |  |  |  */ | 
            
                                                                                                            
                            
            
                                    
            
            
                | 49 |  |  | class Hyde extends Facade | 
            
                                                                                                            
                            
            
                                    
            
            
                | 50 |  |  | { | 
            
                                                                                                            
                                                                
            
                                    
            
            
                | 51 |  |  |     /** @psalm-return HydeKernel::class */ | 
            
                                                                        
                            
            
                                    
            
            
                | 52 |  |  |     protected static function getFacadeAccessor(): string | 
            
                                                                        
                            
            
                                    
            
            
                | 53 |  |  |     { | 
            
                                                                        
                            
            
                                    
            
            
                | 54 |  |  |         return HydeKernel::class; | 
            
                                                                                                            
                            
            
                                    
            
            
                | 55 |  |  |     } | 
            
                                                                                                            
                            
            
                                    
            
            
                | 56 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 57 |  |  |     public static function version(): string | 
            
                                                                                                            
                            
            
                                    
            
            
                | 58 |  |  |     { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 59 |  |  |         return HydeKernel::version(); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 60 |  |  |     } | 
            
                                                                                                            
                            
            
                                    
            
            
                | 61 |  |  |  | 
            
                                                                                                            
                            
            
                                    
            
            
                | 62 |  |  |     public static function getFacadeRoot() | 
            
                                                                                                            
                            
            
                                    
            
            
                | 63 |  |  |     { | 
            
                                                                                                            
                            
            
                                    
            
            
                | 64 |  |  |         return HydeKernel::getInstance(); | 
            
                                                                                                            
                            
            
                                    
            
            
                | 65 |  |  |     } | 
            
                                                                                                            
                                                                
            
                                    
            
            
                | 66 |  |  | } | 
            
                                                        
            
                                    
            
            
                | 67 |  |  |  |