Download the PHP package ansas/php-component without Composer
On this page you can find all versions of the php package ansas/php-component. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package php-component
PHP components
Collection of cross-project PHP classes.
Install:
Ansas\Component\Convert\ConvertPrice
Convert "dirty" prices into Euro or Cent
Methods (without internal):
Ansas\Component\Collection\Collection
Making handling of context data a bit easier.
Usage:
Ansas\Component\Convert\ConvertToNull
This trait can be used to "sanitize values" by setting empty values to null.
It holds methods which can be called in order to check if a field is empty and set it to "null" before calling the parent setter method. By doing this we have a more cleaned up object and also prevent e. g. the "versionable" behavior from adding a new version (as "" !== null).
Methods:
Ansas\Component\Session\ThriftyFileSession
All you need is to configure the native PHP session settings as usual (see http://php.net/manual/de/session.configuration.php).
After that load this class and call the static init() method: Ansas\Component\Session\ThriftyFileSession::init();
This will automatically start the session and you can use the native session handling functions and the super global variable $_SESSION as usual.
The benefit of this class is that session storage on disk and session cookies are set only if $_SESSION has data. Also the session cookie will also be updated with every request, so it will not expire before session.gc_maxlifetime and the cookie will be deleted automatically if you destroy the session (both not the case with pure native PHP sessions).
Methods (without internal):
Ansas\Monolog\Profiler
A small profiler (stop watch) for different profiles that are logged to any Monolog logger.
Methods (without internal):
Usage:
Ansas\Monolog\Processor\ConsoleColorProcessor
Adds colors to Monolog for console output via Processor. The $record
parts level_name
and message
are colored by this processor
Usage:
TODO
- Write tests
Contribute
Everybody can contribute to this package. Just:
- fork it,
- make your changes and
- send a pull request.
Please make sure to follow PSR-1 and PSR-2 coding conventions.
License
MIT license (see the LICENSE file for more information).
All versions of php-component with dependencies
ext-ctype Version *
ext-iconv Version *
ext-intl Version *
ext-json Version *
ext-libxml Version *
ext-mbstring Version *
ext-simplexml Version *