Skip to content

Commit 5863d03

Browse files
committed
Reorder methods to match sibling order
1 parent 9aa1f66 commit 5863d03

File tree

4 files changed

+19
-19
lines changed

4 files changed

+19
-19
lines changed

docs/_data/partials/hyde-pages-api/hyde-kernel-filesystem-methods.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<section id="hyde-kernel-filesystem-methods">
22

33
<!-- Start generated docs for Hyde\Foundation\Concerns\ForwardsFilesystem -->
4-
<!-- Generated by HydePHP DocGen script at 2023-03-11 11:17:34 in 0.10ms -->
4+
<!-- Generated by HydePHP DocGen script at 2024-07-26 14:30:44 in 0.13ms -->
55

66
#### `filesystem()`
77

@@ -35,20 +35,20 @@ No description provided.
3535
Hyde::mediaPath(string $path): string
3636
```
3737

38-
#### `sitePath()`
38+
#### `siteMediaPath()`
3939

4040
No description provided.
4141

4242
```php
43-
Hyde::sitePath(string $path): string
43+
Hyde::siteMediaPath(string $path): string
4444
```
4545

46-
#### `siteMediaPath()`
46+
#### `sitePath()`
4747

4848
No description provided.
4949

5050
```php
51-
Hyde::siteMediaPath(string $path): string
51+
Hyde::sitePath(string $path): string
5252
```
5353

5454
#### `pathToAbsolute()`

packages/framework/src/Foundation/Concerns/ForwardsFilesystem.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,14 @@ public function mediaPath(string $path = ''): string
3333
return $this->filesystem->mediaPath($path);
3434
}
3535

36-
public function sitePath(string $path = ''): string
36+
public function siteMediaPath(string $path = ''): string
3737
{
38-
return $this->filesystem->sitePath($path);
38+
return $this->filesystem->siteMediaPath($path);
3939
}
4040

41-
public function siteMediaPath(string $path = ''): string
41+
public function sitePath(string $path = ''): string
4242
{
43-
return $this->filesystem->siteMediaPath($path);
43+
return $this->filesystem->sitePath($path);
4444
}
4545

4646
public function pathToAbsolute(string|array $path): string|array

packages/framework/src/Foundation/Kernel/Filesystem.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,14 @@ public function mediaPath(string $path = ''): string
100100
return MediaFile::sourcePath($path);
101101
}
102102

103+
/**
104+
* Get the absolute path to the compiled site's media directory, or a file within it.
105+
*/
106+
public function siteMediaPath(string $path = ''): string
107+
{
108+
return MediaFile::outputPath($path);
109+
}
110+
103111
/**
104112
* Get the absolute path to the compiled site directory, or a file within it.
105113
*/
@@ -112,14 +120,6 @@ public function sitePath(string $path = ''): string
112120
return $this->path(path_join(Hyde::getOutputDirectory(), unslash($path)));
113121
}
114122

115-
/**
116-
* Get the absolute path to the compiled site's media directory, or a file within it.
117-
*/
118-
public function siteMediaPath(string $path = ''): string
119-
{
120-
return MediaFile::outputPath($path);
121-
}
122-
123123
/**
124124
* Works similarly to the path() function, but returns a file in the Framework package.
125125
*

spec.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,17 +78,17 @@ Asset::hasMediaFile(string $file) // Returns file_exists(Hyde::mediaPath($file))
7878

7979
```php
8080
Hyde::mediaPath() // Get the absolute path to the media source directory, or a file within it. (Intended as a sibling to Hyde::path and Hyde::sitePath helpers, and the HydePage::path methods)
81+
Hyde::siteMediaPath() // Get the absolute path to the compiled site's media directory, or a file within it. (Intended as a sibling to Hyde::sitePath)
8182
Hyde::mediaLink() // Gets a relative web link to the given file stored in the _site/media folder. (Intended as a sibling to Hyde::relativeLink, which is called by this) (A second $validate parameter will return throw an exception if the file does not exist)
8283
Hyde::asset() // Gets a relative web link to the given image stored in the _site/media folder. (But leaves remote URLs alone) (A second $preferQualifiedUrl parameter will return a fully qualified URL if a site URL is set)
83-
Hyde::siteMediaPath() // Get the absolute path to the compiled site's media directory, or a file within it. (Intended as a sibling to Hyde::sitePath)
8484

8585
/**
8686
* Real implementations of the facade methods:
8787
*
8888
* @see \Hyde\Foundation\HydeKernel::mediaPath {@see \Hyde\Foundation\Kernel\Filesystem::mediaPath}
89+
* @see \Hyde\Foundation\HydeKernel::siteMediaPath {@see \Hyde\Foundation\Kernel\Filesystem::siteMediaPath}
8990
* @see \Hyde\Foundation\HydeKernel::mediaLink {@see \Hyde\Foundation\Kernel\Hyperlinks::mediaLink}
9091
* @see \Hyde\Foundation\HydeKernel::asset {@see \Hyde\Foundation\Kernel\Hyperlinks::asset}
91-
* @see \Hyde\Foundation\HydeKernel::siteMediaPath {@see \Hyde\Foundation\Kernel\Filesystem::siteMediaPath}
9292
*/
9393
```
9494

0 commit comments

Comments
 (0)