Download the PHP package baraja-core/content-storm without Composer
On this page you can find all versions of the php package baraja-core/content-storm. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download baraja-core/content-storm
More information about baraja-core/content-storm
Files in baraja-core/content-storm
Package content-storm
Short Description A simple PHP library for rendering content with components.
License
Homepage https://github.com/baraja-core/content-storm
Informations about the package content-storm
Content with module system
A simple PHP library for rendering content with components.
π¦ Installation
It's best to use Composer for installation, and you can also find the package on Packagist and GitHub.
To install, simply use the command:
You can use the package manually by creating an instance of the internal classes, or register a DIC extension to link the services directly to the Nette Framework.
πΊοΈ Idea
Imagine article in database with content:
In the basic usage, you can write content as plain HTML. In this case, the exact same content that you create is returned.
By adding a comment annotation (for example <!-- brj:heading -->
), you can mark a part of a template as a component.
The component consists of a name (opening and closing tags must be the same), content and optional parameters.
π οΈ Definition
A component is defined as a part of a text file that begins (for example <!-- brj:heading -->
) and ends (<!-- /brj:heading -->
) with a comment annotation.
Common syntax is:
Important parser rules:
- Components cannot be nested.
- The name in the start and end tags must be the same.
- Parameters are written as valid json, which can be embedded. Each parameter always has a key (string) and a value (mixed).
β Debugging
In case of an error, a ParseException
is automatically thrown, which contains information about the passed input and the line number where the error occurred.
If your project supports Tracy, the error is drawn graphically directly in the passed text:
π Compatibility
This package is fully compatible with the WordPress Post component system. This package adds many new features and benefits that you will quickly appreciate.
π License
baraja-core/content-storm
is licensed under the MIT license. See the LICENSE file for more details.
All versions of content-storm with dependencies
ext-json Version *