Download the PHP package ahmjw/php-dom-view without Composer

On this page you can find all versions of the php package ahmjw/php-dom-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 php-dom-view

About

A PHP library to extract and write variables to HTML page by using special attributes. It makes the creation of view be neat and simple. It completely separates view and controller. So, you don't need to write PHP code in view. It's the real view.

Author Profile

Ahmad ([email protected])

Homepage: http://chupoo.introvesia.com

Requirements

Installation

This library is developed to be installed via Composer. Make sure you have installed Composer in your computer. You can download it at URL https://getcomposer.org/download/.

Run this command below at command console.

Or make a file named as composer.json. Write down this code below.

Open the command console at the same directory with composer.json file. Execute this code below to install.

Autoloading

Special HTML Tags

c.content

By writing <c.content></c.content> or <c.content /> in your HTML template, it will replace it with view's content.

c.import

You can call other HTML file by writing <c.import name="menu"></c.import> or <c.import name="menu" />. Write the name of HTML template in attribut name. The value menu will call HTML template file with name "menu.html". It will replace it with the content of called HTML file.

c.partial

You can call other HTML file by writing <c.partial name="header"></c.import> or <c.partial name="header" />. Cut off any part of your written layout and write it to other HTML file. You can use it when you need to share the same part of a layout to other layout. Write the name of HTML template in attribut name. The value header will call HTML template file with name "header.html". It will replace it with the content of called HTML file.

c.widget

It will mark the area as widget area. In it process, system will collect all widgets and store it to widget list. It will render widget HTML file when you send the widget information as feedback. To mark area to show it as widget, write <c.widget name="sidebar"></c.widget> or <c.widget name="sidebar" />. Write the widget key in attribut name. It will put the name value to widget list.

c.config

By writing <c.config layout="two-columns"></c.config> or <c.config layout="two-columns" /> in view HTML, it will execute layout as it declared. Write the name of HTML template in attribut layout. The value two-columns will call HTML template file with name "two-columns.html".

Configuration Attributes

Note: x is the key name in data. 1 is a value. You can define it as number or string.

Example Codes

Autoloading and Class Definition (index.php)

Set configuration

layout_dir is the directory location to put your HTML layout files. view_dir is the directory location to put yout HTML view files.

Sample Data for View

Sample Data for Layout

Showing Output

View HTML code (views/index.html)

Layout HTML code (layouts/index.html)

Widget HTML code (views/menu.html)

Rendering View to Widget

Defining Expression

By adding attribut c.if to element tr with variable selector c.people, this sample code below will show only people who are not from USA.

Separating Layout to Partial Layout (layouts/header.html)

Calling Partial Layout


All versions of php-dom-view with dependencies

PHP Build Version
Package Version
Requires php Version >=5.3
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 ahmjw/php-dom-view contains the following files

Loading the files please wait ....