Download the PHP package sk/object-to-string without Composer
On this page you can find all versions of the php package sk/object-to-string. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package object-to-string
Object To String
Just like the php __toString() method, but with the power of the symfony expression language.
Installation
Download the Library
Open a command console, enter your project directory and execute the following command to download the latest stable version of this bundle:
This command requires you to have Composer installed globally, as explained in the installation chapter of the Composer documentation.
Usage
Before you can use the power of this library you have to initialize it. Depending on your needs, activate the driver you want. Here is a full example with all available driver:
But also you can just activate one driver. Just the annotation driver for example:
Expression Language
This library uses the symfony/expression-language as string generator. Therefore you are able to use all the it's features like caching, extending ...
As a little extra goody, the object self is always available as '_this'.
So instead writing
you are always able to replace it with
Configuration Formats
This library provides all commonly used configuration formats which are annotation, XML, Yaml and Php. It is up to you which one you want to use. Just add the drive and start writing the configuration.
Annotation
Php
YAML
XML
Example Usage
After initializing and defining the names you are now able to use it:
Output
Issues and feature requests
Issues and feature requests are handled on github. If you found a bug, you are always welcome to open an issue. And also feel free to create a pull request with a fix. Same for feature requests.
License
This library is under the MIT license. See the complete license in the library LICENSE file.
All versions of object-to-string with dependencies
symfony/expression-language Version ~2.2 || ~3.0
jms/metadata Version ~1.3
symfony/property-access Version ~2.2 || ~3.0