Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
S
syna
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Thomas Flori
syna
Commits
03c15b97
Unverified
Commit
03c15b97
authored
6 years ago
by
Thomas Flori
Browse files
Options
Downloads
Patches
Plain Diff
write something to the readme
parent
fcb6c458
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
README.md
+25
-1
25 additions, 1 deletion
README.md
src/ViewHelper/AbstractViewHelper.php
+5
-0
5 additions, 0 deletions
src/ViewHelper/AbstractViewHelper.php
with
30 additions
and
1 deletion
README.md
+
25
−
1
View file @
03c15b97
...
...
@@ -6,7 +6,31 @@
[

](https://packagist.org/packages/tflori/syna)
[

](https://packagist.org/packages/tflori/syna)
PHP library for rendering native php templates with sections, inheritance and helpers.
PHP library for rendering native php templates with sections, inheritance and helpers.
This library is inspired by
[
aura/view
](
https://packagist.org/packages/aura/view
)
and
[
league/plates
](
https://packagist.org/packages/league/plates
)
. Both have advantages against each other and both are
lacking some major features.
> Að sýna means to show in Icelandic.
### Helpers
Both libraries are missing a functionality to not register each helper. Syna has the ability to register namespaces
where your helpers are placed. Adding the namespace
`App\ViewHelper`
would load
`App\ViewHelper\Date`
for
`$view->date()`
.
### Layouts
Syna also provides the ability to use layouts as described by the TwoStepView pattern. Other then extending views from
inside a view (suggested by other libraries like league/plates, illuminate/blade etc.) you should define the layout
in your controller. The separation of concerns between extending views and wrapping a html snipped into another one
is logic that should not be decided from views (e. g. loading the content of a modal dialog or loading a full page with
navigation, header and footer).
### Named Locators
### Extending Views
## Installation
...
...
This diff is collapsed.
Click to expand it.
src/ViewHelper/AbstractViewHelper.php
+
5
−
0
View file @
03c15b97
...
...
@@ -9,6 +9,11 @@ abstract class AbstractViewHelper implements ViewHelperInterface
{
protected
$view
;
public
function
__call
(
$name
,
$arguments
)
{
return
$this
->
view
->
__call
(
$name
,
$arguments
);
}
public
function
setView
(
View
$view
)
{
$this
->
view
=
$view
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment