-
-
Notifications
You must be signed in to change notification settings - Fork 13
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 #79 from BKWLD/feature/components
Drop Laravel 4 and 5
- Loading branch information
Showing
27 changed files
with
488 additions
and
919 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
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,87 @@ | ||
<?php | ||
|
||
namespace Bkwld\LaravelPug; | ||
|
||
use Illuminate\Filesystem\Filesystem; | ||
use Illuminate\View\Compilers\CompilerInterface; | ||
use InvalidArgumentException; | ||
use Phug\CompilerInterface as PhugCompiler; | ||
use Pug\Pug; | ||
|
||
interface PugHandlerInterface extends CompilerInterface | ||
{ | ||
/** | ||
* Common pug compiler constructor. | ||
* | ||
* @param array $pugTarget | ||
* @param Filesystem $files | ||
* @param array $config | ||
*/ | ||
public function construct(array $pugTarget, Filesystem $files, array $config, $defaultCachePath = null); | ||
|
||
/** | ||
* Lazy load Pug and return the instance. | ||
* | ||
* @return Pug | ||
*/ | ||
public function getPug(); | ||
|
||
/** | ||
* Returns cache path. | ||
* | ||
* @return string $cachePath | ||
*/ | ||
public function getCachePath(); | ||
|
||
/** | ||
* Get an option from pug engine or default value. | ||
* | ||
* @param string $name | ||
* @param null $default | ||
* | ||
* @return mixed|null | ||
*/ | ||
public function getOption($name, $default = null); | ||
|
||
/** | ||
* @param string $cachePath | ||
*/ | ||
public function setCachePath($cachePath); | ||
|
||
/** | ||
* Determine if the view at the given path is expired. | ||
* | ||
* @param string $path | ||
* | ||
* @return bool | ||
*/ | ||
public function isExpired($path): bool; | ||
|
||
/** | ||
* Return path and set it or get it from the instance. | ||
* | ||
* @param string $path | ||
* | ||
* @throws InvalidArgumentException | ||
* | ||
* @return string | ||
*/ | ||
public function extractPath($path): ?string; | ||
|
||
/** | ||
* Returns the object the more appropriate to compile. | ||
*/ | ||
public function getCompiler(): PhugCompiler; | ||
|
||
/** | ||
* Compile the view at the given path. | ||
* | ||
* @param string $path | ||
* @param callable|null $callback | ||
* | ||
* @throws InvalidArgumentException | ||
* | ||
* @return void | ||
*/ | ||
public function compileWith($path, callable $callback = null): void; | ||
} |
Oops, something went wrong.