PHPackages                             kappa/placeholder-processor - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. kappa/placeholder-processor

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

kappa/placeholder-processor
===========================

Easy system for working with placeholders in texts

v0.2.0(10y ago)0282MITPHP &gt;= 5.4.0

Since Feb 29Compare

[ Source](https://github.com/Kappa-org/PlaceholderProcessor)[ Packagist](https://packagist.org/packages/kappa/placeholder-processor)[ Docs](https://github.com/Kappa-org/PlaceholderProcessor)[ RSS](/packages/kappa-placeholder-processor/feed)WikiDiscussions Synced today

READMEChangelogDependencies (2)Versions (3)Used By (0)

Kappa\\PlaceholderProcessor [![Build Status](https://camo.githubusercontent.com/cad5ac05b21924312056503b401c741f44ee384802d395005319700239402f56/68747470733a2f2f7472617669732d63692e6f72672f4b617070612d6f72672f506c616365686f6c64657250726f636573736f722e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/Kappa-org/PlaceholderProcessor)
=====================================================================================================================================================================================================================================================================================================================================================

[](#kappaplaceholderprocessor-)

Easy system for working with placeholders in texts

Content
-------

[](#content)

- [Requirements](#requirements)
- [Installation](#installation)
- [Usages](#usages)
    - [1. step - Prepare custom placeholder processors](#1-step---prepare-custom-placeholder-processors)
    - [2. step - Create a new instance](#2-step---create-a-new-instance)
    - [3. step - Usage](#3-step---usage)
    - [Strict mode](#strict-mode)

Requirements
------------

[](#requirements)

Full list of dependencies you can get from [Composer config file](https://github.com/Kappa-org/PlaceholderProcessor/blob/master/composer.json)

- PHP 5.4 or higher

Installation
------------

[](#installation)

The best way to install Kappa\\PlaceholderProcessor is using [Composer](https://getcomposer.org)

```
$ composer require kappa/placeholderprocessor
```

Usages
------

[](#usages)

### 1. step - Prepare custom placeholder processors

[](#1-step---prepare-custom-placeholder-processors)

There is a few rules how to create a custom placeholder processors. Each you placeholder processor must implements `\Kappa\PlaceholderProcessor\IPlaceholderProcessor` interface or and it is **recommended** you can extend your class from `\Kappa\PlaceholderProcessor\PlaceholderProcessor` class which implements this interface and prepares logic for easy and quick usage.

For example:

```
