2017 © Pedro Peláez
 

library phpee

Library with same handlers to make php easier

image

phpzm/phpee

Library with same handlers to make php easier

  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 8 % Grown

The README.md

PHP Enterprise Edition

Este é um projeto que tem como objetivo nivelar a experiência de uso da API do PHP criando wrappers para os recursos da linguagem e entregando helpers que quase todo projeto necessita., (*1)

Um exmplo, ao invés de usar file_put_contents() podemos usar Php\File::write(), (*2)

Pseudônimos para as Extensões:

Base64

  • #### string encode(string $string)
    alias: https://php.net/base64_encode
    ex.: Php\Base64::encode(string);
  • #### string decode(string $string, bool $strict = null)
    alias: https://php.net/base64_decode
    ex.: Php\Base64::decode(string, boolean);

Encode

  • #### string ascii(string $string)
    alias: https://php.net/ord
    ex.: Php\Encode::ascii(string);
  • #### string soundex(string $string)
    alias: https://php.net/soundex
    ex.: Php\Encode::soundex(string);

File

  • #### int write(string $filename, mixed $data, int $flags = 0, resource $context = null)
    alias: https://php.net/file_put_contents
    ex.: Php\File::write(string, mixed, int, resource);
  • #### string read(string $filename, bool $use_include_path = false, resource $context = null, int $offset = 0, int $maxlen = null)
    alias: https://php.net/file_get_contents
    ex.: Php\File::read(string, boolean, resource, ìnt, ìnt);
  • #### bool exists(string $filename)
    alias: https://php.net/file_exists
    ex.: Php\File::exists(string);

Hash

  • #### string md5(string $string, bool $raw = false)
    alias: https://php.net/md5
    ex.: Php\Hash::md5(string, bool);
  • #### string sha1(string $string, bool $raw = false)
    alias: https://php.net/sha1
    ex.: Php\Hash::sha1(string, bool);

JSON

  • #### string encode(mixed $value, int $options = 0, int $depth = 512)
    alias: https://php.net/json_encode
    ex.: Php\JSON::encode(string, int, int);
  • #### string decode(string $json, bool $assoc = false, int $depth = 512, int $options = 0)
    alias: https://php.net/json_decode
    ex.: Php\JSON::decode(string, bool, int, int);

Regex

  • #### string split($pattern, string $subject, int $limit = -1, int $flags = 0)
    alias: https://php.net/preg_split
    ex.: Php\Regex::split(string, string, int, int);

Text

  • int length(string $string)

    alias: https://php.net/strlen
    ex.: Php\Text::length(string);, (*3)

  • string replace(string $string, string $search, string $replace)

    alias: https://php.net/str_replace
    ex.: Php\Text::replace(string, string, string);, (*4)

  • mixed first(string $string, string $search)

    alias: https://php.net/strpos
    ex.: Php\Text::first(string, string);, (*5)

  • mixed last(string $string, string $search)

    alias: https://php.net/strrchr
    ex.: Php\Text::last(string, string);, (*6)

  • string upper(string $string)

    alias: https://php.net/strtoupper
    ex.: Php\Text::upper(string);, (*7)

  • string lower(string $string)

    alias: https://php.net/strtolower
    ex.: Php\Text::lower(string);, (*8)

  • string capitalize(string $string)

    alias: https://php.net/ucwords
    ex.: Php\Text::capitalize(string);, (*9)

  • string unCapitalize(string $string)

    alias: https://php.net/lcfirst
    ex.: Php\Text::unCapitalize(string);, (*10)

  • array split(string $delimiter, string $string, int $limit = null)

    alias: https://php.net/explode
    ex.: Php\Text::split(string, string, int);, (*11)

  • string join(string $glue, array $pieces)

    alias: https://php.net/implode
    ex.: Php\Text::join(string, array);, (*12)

  • string levenshtein(string $a, string $b)

    alias: https://php.net/levenshtein
    ex.: Php\Text::levenshtein(string, string);, (*13)

  • string substring(string $string , int $start, int $length = null)

    alias: https://php.net/substr
    ex.: Php\Text::substring(string, int, int);, (*14)

  • string trim(string $string , string $characters = null)

    alias: https://php.net/trim
    ex.: Php\Text::trim(string, string);, (*15)

  • string wrap(string $string , int $width = 75, string $break = "\n", bool $cut = false)

    alias: https://php.net/wordwrap
    ex.: Php\Text::wrap(string, int, string, bool);, (*16)

  • int compare(string $a, string $b)

    alias: https://php.net/strcmp
    ex.: Php\Text::compare(string, string);, (*17)

  • array divide(string $string, int $length = 1)

    alias: https://php.net/str_split
    ex.: Php\Text::divide(string, int);, (*18)

  • string shuffle(string $string)

    alias: https://php.net/str_shuffle
    ex.: Php\Text::shuffle(string);, (*19)

  • string repeat(string $string, int $multiplier)

    alias: https://php.net/str_repeat
    ex.: Php\Text::repeat(string, int);, (*20)

Recursos Adicionais:

Http

  • mixed post(string $index)

    Pega um valor do $POST
    ex.: Php\Http::post(_string
    ), (*21)

  • mixed get(string $index)

    Pega um valor do $GET
    ex.: Php\Http::post(_string
    ), (*22)

  • mixed file(string $index)

    Pega um valor do $FILES
    ex.: Php\Http::post(_string
    ), (*23)

  • mixed all($index = null)

    Pega um valor do $REQUEST
    ex.: Php\Http::all(_string
    ), (*24)

Url

  • string host()

    Pega o nome do host da aplicação
    ex.: Php\Url::host(), (*25)

  • string current()

    Pega a URL em que a aplicação teve a requisição atual solicitada
    ex.: Php\Url::current(), (*26)

The Versions

11/07 2018

dev-master

9999999-dev

Library with same handlers to make php easier

  Sources   Download

MIT

by William Correa

28/01 2018

1.0.0

1.0.0.0

Library with same handlers to make php easier

  Sources   Download

MIT

by William Correa