Skip to content

phpzm/phpee

Folders and files

NameName
Last commit message
Last commit date

Latest commit

cf7a154 · Jul 1, 2019

History

29 Commits
Jul 1, 2019
Jul 1, 2019
Jan 21, 2018
Jan 21, 2018
Jun 30, 2019
Jul 1, 2019

Repository files navigation

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.

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

Pseudônimos para as Extensões:

Base64

Encode

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

Recursos Adicionais:

Http

  • mixed post(string $index)

    Pega um valor do $_POST
    ex.: Php\Http::post(string)

  • mixed get(string $index)

    Pega um valor do $_GET
    ex.: Php\Http::post(string)

  • mixed file(string $index)

    Pega um valor do $_FILES
    ex.: Php\Http::post(string)

  • mixed all($index = null)

    Pega um valor do $_REQUEST
    ex.: Php\Http::all(string)

Url

  • string host()

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

  • string current()

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

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages