Download the PHP package matecat/subfiltering without Composer
On this page you can find all versions of the php package matecat/subfiltering. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download matecat/subfiltering
More information about matecat/subfiltering
Files in matecat/subfiltering
Package subfiltering
Short Description Matecat Subfiltering component
License MIT
Homepage https://github.com/matecat/subfiltering
Informations about the package subfiltering
Matecat Subfiltering
Subfiltering is a component used by Matecat and MyMemory) for string conversion from database to UI layer and viceversa.
How to use
There are two filters available (both are implementation of AbstractFilter
):
MateCatFilter
MyMemoryFilter
Use getInstance
method to instantiate these classes:
The first argument MUST be concrete implementation of Matecat\SubFiltering\Contracts\FeatureSetInterface
.
The other three arguments are optional:
$source
(string) - The source language$target
(string) - The target language$dataRefMap
(array) - A map used for tag replacement (only for segments from Xliff 2.0). A full documentation for dataRef replacement is available here.
dataRef replacement
Basic Usage
Once AbstractFilter
class is instantiated you can use several methods to convert strings from one layer to another one.
MateCatFilter methods
fromLayer0ToLayer2
fromLayer1ToLayer2
fromLayer2ToLayer1
fromLayer2ToLayer0
fromLayer0ToLayer1
fromLayer1ToLayer0
fromRawXliffToLayer0
fromLayer0ToRawXliff
MyMemoryFilter methods
fromLayer0ToLayer1
fromLayer1ToLayer0
Where Layer0
is the DB layer, Layer1
is the intermediate layer and Layer2
is the MateCat's UI layer.
Examples
In the tests
folder there is an fully working example of a concrete implementation of FeatureSetInterface
with a custom filter.
Support
If you found an issue or had an idea please refer to this section.
Authors
License
This project is licensed under the MIT License - see the LICENSE.md file for details
All versions of subfiltering with dependencies
matecat/emoji-to-entity-converter Version ^1
matecat/xml-dom-parser Version ^1
ext-dom Version *
ext-xml Version *
ext-libxml Version *