Download the PHP package maglnet/magl-markdown without Composer

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

MaglMarkdown - ZF2 View Helper For Markdown

Build Status Latest Stable Version License Scrutinizer Code Quality Code Coverage Dependency Status

Introduction

MaglMarkdown is a ZF2 module that adds a View Helper to transform Markdown. To change between different renderers have a look at the config section

You can use one of the following parsers for your Markdown:

Installation

You can install the module with composer by adding the following "require" to your composer.json

after that you need to run

and enable the module within your application.config.php

Usage

View Helper

Simply use it within your Views like this

Service Manager

You can get the MarkdownService through the Service Manager, to use the render() method wherever you like within you zf2 application. MarkdownService automatically uses caching if it has been enabled within the config.

You can also get a MarkdownAdapter through the Service Manager and use transformText() to get your Markdown rendered to HTML.
This is NOT recommended anymore. Use the above mentioned MarkdownService instead because it can use the provided caching mechanism.

Security warning:
You should be aware, that your markdown could contain insecure content (e.g. user generated content). So use something like HTMLPurifier to sanitize your output.

Configuration

Copy the provided config file config/maglmarkdown.local.php to your autoloading directory YourZF2Application/config/autoload/maglmarkdown.local.php and adjust it to your needs.
By default PHP-MarkdownExtra parser by Michel Fortin is used.

Cache

By default, caching is disabled. Set cache_enabled to true within config/maglmarkdown.local.php to enable the caching. Caching could be very helpful if you have large markdown files/texts or if you're using an Adapter that relies on third-party APIs that either are rate limited or take a long time to render.

A simple filesystem cache is configured by default, but feel free to configure your own adapter.

Adding own parsers

It is possible to add your own parser implementation.
All you have to do, is to write a class that implements the MaglMarkdown\Adapter\MarkdownAdapterInterface interface and make it available through the service manager.
After that override the alias MaglMarkdown\MarkdownAdapterto point to your custom adapter.
MaglMarkdown will then use this class to transform the Markdown.

Events

The markdown service triggers two events you can listen to:

These events are currently used for the integrated caching feature only, but do whatever you like with these events.

Contributors

MaglMarkdown is developed by Matthias Glaub and contributors.

License

MaglMarkdown is licensed under the MIT license.
See the included LICENSE file.

Based on PHP Markdown Lib
Copyright (c) 2004-2013 Michel Fortin
http://michelf.ca/
All rights reserved.

Based on parsedown
Copyright (c) 2013 Emanuil Rusev
http://erusev.com/
All rights reserved.

Based on The PHP League's Common Mark implementation
Copyright (c) 2014, Colin O'Dell
https://github.com/thephpleague/commonmark
All rights reserved.

Based on Markdown
Copyright (c) 2003-2005 John Gruber
http://daringfireball.net/
All rights reserved.


All versions of magl-markdown with dependencies

PHP Build Version
Package Version
Requires php Version ^7.3 || ^8.0
ext-curl Version *
ext-json Version *
michelf/php-markdown Version ^1.4
erusev/parsedown-extra Version ~0.5
league/commonmark Version ^0.18 || ^1.5.0 || ^2.0.0
erusev/parsedown Version ^1.6
laminas/laminas-stdlib Version ^2.4 || ^3.0
laminas/laminas-http Version ^2.4
laminas/laminas-mvc Version ^2.4 || ^3.0
laminas/laminas-eventmanager Version ^2.4 || ^3.0
laminas/laminas-modulemanager Version ^2.4
laminas/laminas-view Version ^2.4
laminas/laminas-cache Version ^2.3 || ^3.0
laminas/laminas-cache-storage-deprecated-factory Version ^1.0
laminas/laminas-cache-storage-adapter-memory Version ^2.0
laminas/laminas-servicemanager Version ^2.4 || ^3.1.1
container-interop/container-interop Version ^1.1
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 maglnet/magl-markdown contains the following files

Loading the files please wait ....