Download the PHP package bjoernffm/spintax without Composer
On this page you can find all versions of the php package bjoernffm/spintax. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download bjoernffm/spintax
More information about bjoernffm/spintax
Files in bjoernffm/spintax
Package spintax
Short Description Spintax {parsing|processing} library.
License MIT
Homepage https://github.com/bjoernffm/spintax
Informations about the package spintax
Spintax
Spintax is a library which offers implementation of some commonly used patterns used in Symfony2 DI.
Installation
This library is provided as Composer package. To install it simply execute the following command:
Note: This library requires PHP 7.2+.
Usage
The simplest usage that will mostly fulfill your needs is to simple parse the spintax string and generate random variation of it:
But there is much more that than that in our library. First of all nested structures are supported:
Still not finished! With our brilliant library you can detect the path used to generate given variant and re-use it later:
Paths are counted from 0, each entry is next step.
You can also use partial paths to define just the starting path and all missing parts will be choosen randomly:
For all this there is a shortcut method Parser::replicate()
(you can use comma-separated number in a single string as second argument in this shortcut method):
For more advanced aspects see advanced usage documentation or even internals description.
Resources
- Source documentation
- GitHub page with API documentation
- Issues tracker
- Packagist package
- Development @ GitHub
Contributing
Do you want to help improving this project? Simply fork it and post a pull request. You can do everything on your own, you don't need to ask if you can, just do all the awesome things you want!
This project is published under MIT license.