PHP Classes

File: README.md

Recommend this page to a friend!
  Classes of ángel cruz   abr4xas utilities   README.md   Download  
File: README.md
Role: Documentation
Content type: text/markdown
Description: Documentation
Class: abr4xas utilities
General purpose utility classes
Author: By
Last change: Update README.md
agrega mas metodos
agrega nueva clase
Date: 5 years ago
Size: 2,808 bytes
 

Contents

Class file image Download

<img align="left" width="180" src="https://blog.abr4xas.org/icons/apple-icon-180x180.png">

Utilidades

GitHub issues GitHub forks GitHub license Scrutinizer Code Quality Codacy Badge

Un simple composer package que puede servir de utilidad a cualquiera con muchas herramientas que facilitan el desarrollo de proyectos mucho más rápido.

how to install

Add this to your composer.json

"require": {
    "abr4xas/utils": "dev-master"
}

Then:

$ composer update
$ composer dumpautoload -o // optional

components

use Abr4xas\Utils\Hash;
use Abr4xas\Utils\SeoUrl;
use Abr4xas\Utils\Gravatar;
use Abr4xas\Utils\UploadsIm;
use Abr4xas\Utils\TimeFormat;
use Abr4xas\Utils\GoogleShortUrl;
use Abr4xas\Utils\SuggestKeyword;
use Abr4xas\Utils\OpenWeatherMap;
use Abr4xas\Utils\PrettyPrintArray;

how to use


<?php

require 'vendor/autoload.php';

use Abr4xas\Utils\Hash;
// read the docs :smile:

use Abr4xas\Utils\SeoUrl;
SeoUrl::generateSlug('this is an awesome string');

use Abr4xas\Utils\Gravatar;
Gravatar::getAvatarUrl('email@domain.tld', ['s'=> 80, 'd'=>'mm', 'secure' => true]);

use Abr4xas\Utils\UploadsIm;
UploadsIm::uploadImages('image.jpg', $fileType); // default `$fileType` image/jpeg

use Abr4xas\Utils\TimeFormat;
TimeFormat::timeAgo('2017-07-11'); 

use Abr4xas\Utils\OpenWeatherMap;
OpenWeatherMap::openWeatherMap('city','api key');

use Abr4xas\Utils\PrettyPrintArray;
PrettyPrintArray::prettyPrintArray($var);


use Abr4xas\Utils\SuggestKeyword;
$keywords = SuggestKeyword::SuggestKeyword('php');
PrettyPrintArray::prettyPrintArray($keywords);

// Output:
// Array
// (
//     [0] => php
//     [1] => phpmyadmin
//     [2] => php date
//     [3] => phpstorm
//     [4] => php online
//     [5] => php array length
//     [6] => php foreach
//     [7] => phpunit
//     [8] => php array
//     [9] => php try catch
// )

use Abr4xas\Utils\GoogleShortUrl;
$url = GoogleShortUrl::shortUrl('https://blog.abr4xas.org/','apiKey');
// Output: https://goo.gl/83ymQE