Download the PHP package kiryi/viewyi without Composer

On this page you can find all versions of the php package kiryi/viewyi. 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 viewyi

Kiryi's VIEWYI

A native PHP view engine for web applications.

Installation

Usage

First initialize the engine in one of three possible ways. See Templating.

Constructor Definition

Parameters

config
Optional configuration array or filepath to custom configuration INI file. If nothing is provided, default (config/viewyi.ini) is used (more information).

Method Definition assign

Assigns a variable to the view's data object.

Parameters

key
The variable's key.

value
The variable's value. Can be string, any number, array, bool or null.

Method Definition render

Renders the current view (HTML page). Have to be called before display.

Parameters

template
The template name to use as render base.

Return Values

Returns the fully rendered view.

Method Definition reset

Resets the view's data object and view object. This helps dealing with large pages and especially in case of nested templates.

Return Values

Returns the current fully rendered view.

Method Definition display

Finally displays the whole HTML page. It is necessary to call render at least once before. The rendered view is always embeded to the page's HTML body element. display can only be called once.

Parameters

headTemplate
The template name to embed into the HTML page's head element.

title
The title of the current page set to the HTML page's title element.

Initialization

You have to provide the engine at least three mandatory parameters as well as an optional fourth.

baseUrl
The base URL of your web application.

imagePath
The image directory path relative to your base URL.

templateDirectory
The template directory path relative to your project's root directory.

templateFileExtension (optional)
Optional file extension of your template files, if you want to use something else than the default .php.

The parameters can be provided by using the standard configuration file {PROJECTSROOTDIRECTORY}/config/viewyi.ini with the following contents:

Or by passing another INI file path to the engines's constructor with the same contents. The path has to be relative to your project's root directory:

Or by passing an array with the three to four parameters to the constructor:

Templating

Example

configuration/config.ini

src/View/head.tpl.php

src/View/home.tpl.php

src/Controller/HomeController.php

will generate the HTML5 page:


All versions of viewyi with dependencies

PHP Build Version
Package Version
Requires php Version ^7.4
kiryi/pathyi Version ^1.0
kiryi/inyi Version ^1.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 kiryi/viewyi contains the following files

Loading the files please wait ....