PHPackages                             maximaster/meta-bind - 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. maximaster/meta-bind

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

maximaster/meta-bind
====================

Binds arbitrary meta data to conditions and allows to resolve them for provided input.

1.0.0(12mo ago)00MITPHP

Since May 23Pushed 12mo agoCompare

[ Source](https://github.com/maximaster/meta-bind)[ Packagist](https://packagist.org/packages/maximaster/meta-bind)[ RSS](/packages/maximaster-meta-bind/feed)WikiDiscussions main Synced 1mo ago

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

maximaster/meta-bind
====================

[](#maximastermeta-bind)

Binds arbitrary meta data to conditions and allows to resolve them for provided context.

Meta data and condition processed using a CSV file.

Install
-------

[](#install)

```
composer require maximaster/meta-bind
```

Prepare your CSV file
---------------------

[](#prepare-your-csv-file)

```
url starts?;url contains?;url containsOnce?;title;description;h1
/catalog;;color=red;Red Products;All red product we offer;Red Products
```

Condition column name format
----------------------------

[](#condition-column-name-format)

- variable name (any name without spaces which you will later pass into `firstFit` method)
- space
- condition name (see below)
- ends with `?`

Columns that are not end with `?` treats as meta data values.

Supported conditions
--------------------

[](#supported-conditions)

- `starts`
- `contains`
- `containsOnce`
- `equals`
- everything else would resolve as false

Use it (example for Bitrix CMS)
-------------------------------

[](#use-it-example-for-bitrix-cms)

```
