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:

Basic Usage

Any dependencies will be injected automatically when loading from the Container.

Methods

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 TemplateLocator 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 TemplateLocator paths.

Layouts

You can use layouts when rendering views by placing a default.php file in a layouts folder of one of the defined TemplateLocator 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.

Cell classes must exist in a namespace that will be loaded by the CellRegistry.

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 TemplateLocator 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.

Template Locator

Autoloading

It is recommended to bind the TemplateLocator to the Container as a singleton.

Template Locator Methods

Add Path

Add a path for loading templates.

Get Paths

Get the paths.

Locate

Find a file in paths.

Remove Path

Template Locator Static Methods

Normalize

Normalize a template file name.

Cell Registry

Autoloading

It is recommended to bind the CellRegistry to the Container as a singleton.

Any dependencies will be injected automatically when loading from the Container.

Cell Registry Methods

Add Namespace

Add a namespace for automatically loading cells.

Build

Build a cell.

Clear

Clear all namespaces and cells.

Find

Find a cell class.

Get Namespaces

Get the namespaces.

Has Namespace

Check if a namespace exists.

Remove Namespace

Remove a namespace.

Helper Registry

Autoloading

It is recommended to bind the HelperRegistry to the Container as a singleton.

Any dependencies will be injected automatically when loading from the Container.

Helper Registry Methods

Add Namespace

Add a namespace for automatically loading helpers.

Build

Build a helper.

Clear

Clear all namespaces and helpers.

Find

Find a helper class.

Get Namespaces

Get the namespaces.

Has Namespace

Check if a namespace exists.

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 (and optionally an $options array as the second parameter).

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/container Version ^1.0
fyre/csp Version ^7.0
fyre/csrf Version ^5.0
fyre/formatter Version ^4.0
fyre/formbuilder Version ^3.0
fyre/htmlhelper Version ^3.0
fyre/lang Version ^5.0
fyre/orm Version ^11.0
fyre/path Version ^2.0
fyre/router Version ^7.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 ....