Download the PHP package hnrazevedo/viewer without Composer

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

# Viewer @HnrAzevedo

Maintainer Latest Version Scrutinizer Code Quality Build Status PHP from Packagist Total Downloads

The Viewer is a simple component of managing the MVC project visualization layer. It can be used individually statically or together as middleware. Its author is not a professional in the development area, just someone in the Technology area who is improving his knowledge.

O Viewer é um simples componente de administração da camada de visualização de projetos MVC. Ele pode ser utilizado de forma individualmente de forma estática ou em conjunto como middleware. Seu autor não é profissional da área de desenvolvimento, apenas alguem da área de Tecnologia que está aperfeiçoando seus conhecimentos.

Highlights

Installation

Viewer is available via Composer:

or in at terminal

Methods

Extensions

Basic use

Return rendering

To return the content in a variable instead of being rendered, use the optional parameter of the render method

Para retornar em uma váriavel o conteúdo ao invés de ser renderizado, utilize o parametro opcional do método render

Data transfer between the view and the controller

Returning data in the view

The htmlspecialchars function is used by default as an escape to prevent XSS attacks.

É utilizado de forma padrão a função htmlspecialchars como escape para evitar ataques XSS.

Sintax:

Sintaxe:

To display information without space use the syntax:

Para exibir informações sem espace utilize a sintaxe:

HTML file example

Note: If there is no variable to replace the value defined in the view, the text will be visible

HTML file result example:

Returning object properties

IMPORTANT: to return any property of an object, the property must be public, to be returned with the "get_object_vars" function, or a function with the name "getVars" must be defined, returning an array with the properties that need to be executed __get.

Models\User.php

Example\User.php

default.view.php

Result of default.view.php

Import content within the view.

NOTE: File extension inc.php

NOTE: File path is from the defined view path in question

If the file is not found, in order to avoid a page break, a div results with an error message instead of include.

Caso o arquivo não seja encontrado, para não haver quebra de página, é resultado uma div com a mensagem de erro no lugar do include.

HTML compression

All code returned from a view or include is compressed. Thus, to avoid code problems, all comments are ignored when rendering the content.

Todo código retornado de uma view ou include é compressado. Com isto, para evitar problemas de código, todos os comentários são ignorados na renderização do conteúdo.

Source code

Rendered code

Support

Security: If you discover any security related issues, please email [email protected] instead of using the issue tracker.

Se você descobrir algum problema relacionado à segurança, envie um e-mail para [email protected] em vez de usar o rastreador de problemas.

Credits

License

The MIT License (MIT). Please see License File for more information.


All versions of viewer with dependencies

PHP Build Version
Package Version
Requires php Version >=7.4
hnrazevedo/http Version dev-master
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 hnrazevedo/viewer contains the following files

Loading the files please wait ....