Download the PHP package dev-macb/ambivar without Composer

On this page you can find all versions of the php package dev-macb/ambivar. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package ambivar

🔷 Ambivar 🔷

Packagist Version Packagist Downloads Packagist License

🎯 Objetivo

O Ambivar é um pacote em PHP para facilitar a gestão de variáveis de ambiente em projetos. Ele permite carregar e manipular variáveis através de um arquivo .env, garantindo segurança e flexibilidade para o gerenciamento de configurações do sistema.

🔷

🔧 Instalação

Para instalar o Ambivar, certifique-se de ter o PHP e o Composer instalados. Execute o seguinte comando:

🔷

🚀 Uso Básico

Carregamento de Variáveis

Manipulação de Variáveis

Acesso às Variáveis

🔷

📚 Documentação Técnica

ambivar(string $diretorioBase = null): void

Define o diretório base para carregar arquivos .env.

dotenv(): bool

Carrega o arquivo .env padrão do diretório base.

carregar(string $caminhoDoArquivoEnv): bool

Carrega um arquivo .env específico.

carregarDiretorio(string $diretorio): int

Carrega todas as variáveis de ambiente dos arquivos .env dentro de um diretório.

existe(string $chave): bool

Verifica se uma variável de ambiente existe.

obter(string $chave, mixed $padrao = null): mixed

Obtém o valor de uma variável de ambiente ou retorna um valor padrão se não existir.

obterTodos(): array

Retorna todas as variáveis de ambiente carregadas.

adicionar(string $chave, string $valor, ?string $caminhoDoArquivoEnv = null): bool

Adiciona ou atualiza uma variável de ambiente.

adicionarVarios(array $variaveis, ?string $caminhoDoArquivoEnv = null): int

Adiciona múltiplas variáveis de ambiente de uma só vez.

remover(string $chave, ?string $caminhoDoArquivoEnv = null): bool

Remove uma variável de ambiente.

Boas Práticas

✒️ Contribuições

Se deseja contribuir, relate problemas ou sugira melhorias abrindo uma Issue ou enviando um Pull Request. Se gostou do projeto, deixe uma ⭐ para apoiar!

🔷

📄 Licença

O Ambivar é licenciado sob a MIT License. Consulte os termos em LICENSE.

🔷


All versions of ambivar with dependencies

PHP Build Version
Package Version
Requires php Version >=7.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package dev-macb/ambivar contains the following files

Loading the files please wait ....