-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #362 from hydephp/351-allow-site-output-directory-…
…to-be-customized Allow site output directory to be customized
- Loading branch information
Showing
14 changed files
with
425 additions
and
133 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<?php | ||
|
||
namespace Hyde\Framework\Concerns; | ||
|
||
/** | ||
* @see \Tests\Unit\InteractsWithDirectoriesConcernTest | ||
*/ | ||
trait InteractsWithDirectories | ||
{ | ||
/** | ||
* Ensure the supplied directory exist by creating it if it does not. | ||
* | ||
* @param string $directory absolute file path to the directory | ||
*/ | ||
public function needsDirectory(string $directory): void | ||
{ | ||
if (! file_exists($directory)) { | ||
mkdir($directory, recursive: true); | ||
} | ||
} | ||
|
||
/** | ||
* Ensure the supplied directories exist by creating them if they don't. | ||
* | ||
* @param array $directories array with absolute file paths to the directories | ||
*/ | ||
public function needsDirectories(array $directories): void | ||
{ | ||
foreach ($directories as $directory) { | ||
$this->needsDirectory($directory); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.