Download the PHP package solution-web/marty without Composer

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

Marty

Continuous
Integration Latest Stable
Version Total
Downloads License

Marty is a simple Smarty view renderer for the Mako framework.

Requirements

Marty has been tested on all current Mako versions. Any other version may work, but has not been tested. Unit tests are run against PHP 7.0 and up. Smarty 3 or 4 is required, but will be pulled in as part of the installation.

Installation

Marty can be added to your Mako project using composer! Just add it to your requirements

Usage

Once installed, you will need to add it to your packages list. You do this by adding it to the "Web" packages. This is located in the file app/config/application.php.

This enables the Smarty View renderer for every view with the ".tpl" file extension.

Configuration

Configuration can be done by changing the marty::smarty configuration. Just refer to the Mako documentation on package configuration for details.

The configuration properties are as follows:

Configuration property Type Description Default
smarty.templateDir string The location to find smarty templates. Your app/views directory.
smarty.compileDir string The location to store compiled templates. A new directory smarty in your app/storage directory.
smarty.pluginDirs string[] A list of directories to search for smarty plugins. An empty array.

Plugins

Marty supports the plugin structure offered by Smarty, and extends it to use the dependency injector offered by the Mako framework.

Plugin dirs can be added to the config. The structure for plugins can be found in the Smarty Documentation. Due to the fact that Mako resolves parameters by name, Smarty plugin parameters should have their names as specified in the documentation. This means that the parameters should be named as follows:

As an example, we can build a small plugin that uses the I18n module of the framework.

Then, we can use your plugin like this:

Contributing

If there are any features in Smarty that cannot (easily) be used in the current package, or if there are Mako features that are hard to bind to Smarty, feel free to file an issue or a pull request.

Code style and such are ran using GrumPHP. Make sure that your files are in accordance to those rules.


All versions of marty with dependencies

PHP Build Version
Package Version
Requires php Version ^7.2
smarty/smarty Version ^3
mako/framework Version ^6.0 || ^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 solution-web/marty contains the following files

Loading the files please wait ....