- Base is done; most of the language's components are now working!

- Implemented OPCACHE caching
- Added View() token logic
- New FileFetcher added to gather files from given view path
This commit is contained in:
mcndave committed 2019-11-01 14:46:01 -04:00
1 parent bcd49884fc
commit 6701a1cd59
16 files changed
+323 -69

No files matched your search

+13
View File
@@ -0,0 +1,13 @@
<?php
namespace Picea\Extension;
class AssetExtension implements Extension {
public string $token = "asset";
public function parse(/*\Picae\Compiler\Context*/ &$context, ?string $arguments, string $token) {
return "<?php echo 'assets! $arguments' ?>";
}
}
+13
View File
@@ -0,0 +1,13 @@
<?php
namespace Picea\Extension;
class LanguageExtension implements Extension {
public array $tokens = [ "lang", "_" ];
public function parse(/*\Picae\Compiler\Context*/ &$context, ?string $arguments, string $token) {
return "<?php /* echo lang($arguments) */ ?>";
}
}
+13
View File
@@ -0,0 +1,13 @@
<?php
namespace Picea\Extension;
class TitleExtension implements Extension {
public string $token = "title";
public function parse(/*\Picae\Compiler\Context*/ &$context, ?string $arguments, string $token) {
return "<?php /* echo title ?? */ ?>";
}
}
+13
View File
@@ -0,0 +1,13 @@
<?php
namespace Picea\Extension;
class UrlExtension implements Extension {
public array $tokens = [ "url" , "route" ];
public function parse(/*\Picae\Compiler\Context*/ &$context, ?string $arguments, string $token) {
return "<?php /* echo url ?? */ ?>";
}
}