arx/utils

This package is abandoned and no longer maintained. No replacement package was suggested.

Arx Utils classes to use in any kind of projects

4.2.2 2015-03-13 12:46 UTC

This package is auto-updated.

Last update: 2020-01-21 00:11:34 UTC


README

Latest Stable Version Total Downloads License

Features

  • Some usefull php class and methods (inspired by Laravel) to use in any kind of PHP projects

Getting started

Requirements

Installation

In the require key of composer.json file add the following

"arx/utils": "dev-master"
$ composer update
    require 'vendor/autoload.php'

How to use it

    require 'vendor/autoload.php';
    
    use Arx\Utils\Utils;
    
    # Debug method 
    
    Utils::pre(['test']);
    
    # Debug with die
    
    Utils::predie('test');
    
    # Make an alias helper
    
    Utils::alias('dd', 'Utils::predie');
    
    # Manipulate an array
    
    ## Merge recursively
    Arx\Utils\Arr::merge(['test' => ['foo1']], ['test' => ['foo2']]);
    
    # Manipulate an image
    ## Resize an image to best fix max width, max height
    Arx\Utils\Image::load('$$path$$')->best_fit(400, 400)->save($$dest_path$$);
    
    ## Resize an image to best fix max width, max height and output Base64 string
    Arx\Utils\Image::load('$$path$$')->fit_to_width(400)->outputBase64(); # output as base64 to load directly from img src

Release Notes

Version 4.2.0

  • use Laravel tagging version to simplify the version correspondance (so yes we jump directly to 4.2 instead of 1.0)

License

Arx Utils is free software distributed under the terms of the MIT license

Aditional information

Any questions, feel free to contact me or ask here

Any issues, please report here