Download the PHP package fyre/view without Composer

On this page you can find all versions of the php package fyre/view. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package view

FyreView

FyreView is a free, open-source template rendering library for PHP.

Table Of Contents

Installation

Using Composer

In PHP:

Views

Get Data

Get the view data.

Get Layout

Get the layout.

Get Request

Get the ServerRequest.

Load Helper

Load a Helper.

Render

Render a template.

Templates files must end in the extension .php, and must exist in one of the defined paths.

Set Data

Set view data.

Set Layout

Set the layout.

Layout files must end in the extension .php, and must exist in a "layouts" folder in one of the defined paths.

Layouts

You can use layouts when rendering views by placing a default.php file in a layouts folder of one of the defined paths. You can create multiple layouts, and specify the layout to use with the setLayout method above.

The rendered content is passed to the layout file via the content method of $this. Any other defined data is also passed to the layout.

Cells

Custom cells can be created by extending \Fyre\View\Cell, and suffixing the class name with "Cell".

Cell

Render a Cell.

Elements

Element

Render an element.

Element files must end in the extension .php, and must exist in an "elements" folder in one of the defined paths.

Blocks

Append

Append content to a block.

Any output until the block is ended will be appended to the block.

Assign

Assign content to a block.

End

End a block.

Fetch

Fetch a block.

Prepend

Prepend content to a block.

Any output until the block is ended will be prepended to the block.

Reset

Reset content of a block.

Start

Start content for a block.

Templates

Layouts, templates and elements are loaded by searching available paths.

Add Path

Add a path for loading templates.

Get Paths

Get the paths.

Locate

Find a file in paths.

Normalize

Normalize a template file name.

Remove Path

Cell Registry

Add Namespace

Add a namespace for automatically loading cells.

Clear

Clear all namespaces and cells.

Find

Find a cell class.

Get Namespaces

Get the namespaces.

Has Namespace

Check if a namespace exists.

Load

Load a cell.

Remove Namespace

Remove a namespace.

Helper Registry

Add Namespace

Add a namespace for automatically loading helpers.

Clear

Clear all namespaces and helpers.

Find

Find a helper class.

Get Namespaces

Get the namespaces.

Has Namespace

Check if a namespace exists.

Load

Load a helper.

Remove Namespace

Remove a namespace.

Helpers

Helpers can be used inside of templates or elements using the class name as a property of $this.

Alternatively, you can load a helper with configuration options using the loadHelper method of the View.

Custom helpers can be created by extending \Fyre\View\Helper, suffixing the class name with "Helper", and ensuring the __construct method accepts View as the argument.

Get Config

Get the configuration options.

Get View

Get the View.

CSP

The CSP helper allows an easy way to generate nonces, and automatically add them to your CSP policies.

Script Nonce

Generate a script nonce.

Style Nonce

Generate a style nonce.

Form

Button

Render a button element.

By default, the button content will be HTML escaped. To disable this, set the escape value to false in the options array.

All other options will be created as attributes on the button element.

Close

Render a form close tag.

Fieldset Close

Render a fieldset close tag.

Fieldset Open

Render a fieldset open tag.

All options will be created as attributes on the fieldset element.

Input

Render an input element.

All options will be created as attributes on the input element.

You can also use the following helper methods to generate specific input type fields.

Label

Render a label element.

The label text will be retrieved from the Lang using the Field.{field_name} key or converted from the field name. You can also set custom label text by setting the text option.

By default, the label content will be HTML escaped. To disable this, set the escape value to false in the options array.

All other options will be created as attributes on the label element. The default for attribute will be converted from the field key.

Legend

Render a legend element.

By default, the legend content will be HTML escaped. To disable this, set the escape value to false in the options array.

All other options will be created as attributes on the legend element.

Open

Render a form open tag.

All options will be created as attributes on the form element.

Open Multipart

Render a multipart form open tag.

All options will be created as attributes on the form element.

Format

The format helper provides a convenient wrapper for Formatter methods.

Url

The URL helper provides methods for generating Router links.

Link

Generate an anchor link for a destination.

Path

Generate a url for a relative path.

To

Generate a url for a named route.


All versions of view with dependencies

PHP Build Version
Package Version
Requires fyre/csp Version ^2.0
fyre/csrf Version ^3.0
fyre/formatter Version ^3.0
fyre/formbuilder Version ^2.0
fyre/htmlhelper Version ^2.0
fyre/lang Version ^3.0
fyre/orm Version ^8.0
fyre/path Version ^2.0
fyre/router Version ^6.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package fyre/view contains the following files

Loading the files please wait ....