2017 © Pedro Peláez
 

library parsertext

This is a PHP class to parse the text using the template

image

zualex/parsertext

This is a PHP class to parse the text using the template

  • Tuesday, October 11, 2016
  • by zualex
  • Repository
  • 1 Watchers
  • 0 Stars
  • 7 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

ParserText

This is a PHP class to parse the text using the template., (*1)

Installation

composer require zualex/parsertext

Exmaple

require_once __DIR__ . '/vendor/autoload.php';

use \ParserText\ParserText;

$parserSms = new ParserText('
    Никому не говорите пароль! Его спрашивают только мошенники.
    Пароль: {% password %}
    Перевод на счет {% receiver %}
    Вы потратите {% sum %}р.
');

print_r($parserSms->run('
    Никому не говорите пароль! Его спрашивают только мошенники.
    Пароль: 72946
    Перевод на счет 410011068150008
    Вы потратите 5025,13р.
'));

Result:, (*2)

[
    'password' => '72946',
    'receiver' => '410011068150008',
    'sum' => '5025,13',
]

The Versions

11/10 2016

dev-master

9999999-dev https://github.com/zualex/parsertext

This is a PHP class to parse the text using the template

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

The Development Requires

by Alexandr Zubarev

parser template php text

11/10 2016

1.0.0

1.0.0.0 https://github.com/zualex/parsertext

This is a PHP class to parse the text using the template

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

The Development Requires

by Alexandr Zubarev

parser template php text