Download the PHP package molajo/molajito without Composer

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

======= Molajito Render Package

Build Status

Molajito is a template environment for frontend developers who want to focus on markup, not programming. It locates views, injects escaped data, integrates with Event handling, offers translation support for language strings, and more.

Sample

A working example of a website that has a Home, Blog, Post, Contact, About, page is available within this package. To view the sample, configure an Apache Host to this Sample / Public folder and access the Host using your browser.

Basic Process:

Molajito initiates the rendering process by including a Theme file as rendered output. The theme contains Include Statements discovered by Molajito during parsing and used to identify what view is to be rendered at that location.

Molajito uses three different types of `views':

You can also use include statements to define positions which are placeholders that can be associated with one or more template views. For example, you might want a sidebar position for a blog that can be configured by site builders.

Theme

Themes are the first rendered output and therefore drive the rendering process. Typically, a theme defines necessary CSS and JS statements.

Molajito injects a data object called $this->runtime_data into the Theme. As can be seen in the following example, Molajito passes in the $this->runtime_data->page_name value used in the page include statement.

You can add data the $this->runtime_data so that the data are available for rendering. In this example, site_name is used to render title.

In the theme below, you will find include statements for page, template and wrap views.

Include Statements

Molajito uses include statements to define where specific views should be rendered. Include statements can be defined within any theme or template which helps to create reusable templates referenced in many places in order to keep your views DRY and easy to maintain. Molajito continues parsing rendered output after rendering each view until no more include statements are found.

The Include syntax is simple {I type=Name I}:

Extra attributes {I template=Templatename class=current,error dog=food I} can be added to the include statement by adding named pair attributes.

Page

{I page=<? $this->runtime_data->page_name ?> I}

Themes are typically where page views are defined. The page_name is passed into the theme via the $this->runtime_data->page_name object. However, a page view could be defined anywhere. What is important to remember is that Molajito simple includes the page view file without passing in data.

Following is an example of a page view for a blog post. The page layout calls for three template views: a post, comments, and a paging template. The page layout also includes a sidebar position. If there is no position with the name sidebar, Molajito searches for a like-named `template view.'

Position

{I Sidebar I}

If type= is omitted from the include statement, Molajito first searches for a position with that name. If a position with that name is not found, Molajito next search for a like named template view.

You can define which template views are associated with a position by defining the values in an array for $type = 'page' or $type = 'theme'. Molajo will check for positions in that sequence. If positions are found, Molajito inserts (I template=Name I} values for each template view defined.

$this->plugin_data->render->extension->$type->parameters->positions

Template

{I template=Templatename I}

Molajito injects data into the Template view for support in rendering. As with the Theme, Molajito passes in the $this->runtime_data object which you can use to ensure specific data is available for rendering.

There are two ways to configure a template view.

  1. Custom.php - Molajito will inject the view with $this->query_results and this->runtime_data, but the view must handle looping, if needed.

  2. Header.php, Body.php, and Footer.php - Molajito will inject Body.php with $this->row and $this->runtime_data one time for each row. If Header.php exists, it will get the first row. If Footer.php exists, it will get the last row.

An example of a typical template view Body.php file follows.

Wrap

{I template=Templatename wrap=Wrapname I}

To wrap a template view, add the wrap=Wrapname element to the include statement.

A typical Wrap view requires three files each of which Molajito will inject the view with $this->row (containing the rendered output from the template view) and this->runtime_data.

Localization

{T Translate this string T}

Molajito supports localization using language strings and translations. Simply create a token like this example and inject the translate class [with an array of language strings and translations] (https://github.com/Molajo/Molajito/blob/master/Sample/Bootstrap/Index.php#L20) or add an Translate Adapter for your Translation class.

Requirements and Compliance


All versions of molajito with dependencies

PHP Build Version
Package Version
Requires php Version >=5.4
commonapi/render Version dev-master
commonapi/exception Version dev-master
molajo/resources 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 molajo/molajito contains the following files

Loading the files please wait ....