Download the PHP package jelix/properties-file without Composer

On this page you can find all versions of the php package jelix/properties-file. 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 properties-file

Some classes to read and write properties files.

Properties files are like Java Properties file. The implemented format is using to store locales for an application made with Jelix, a PHP Framework.

installation

The library is compatible from PHP 5.6 to PHP 8.1.

You can install it from Composer. In your project:

Usage

You have two classes: Properties which is a container for key/value pairs, a Reader to parse a properties file and a Writer to write properties into a file.

Options for the writer:

History

The parser is based on a class, jBundle coming from the Jelix Framework until Jelix 1.6, and has been released in 2018 into a separate repository as Jelix\PropertiesFile\Parser.

Format

The file content structure is quite simple. It's basically a key=string structure, with some improvements.

You can't use double and single quotes to delimit your strings, new lines do this.

Keys can contain characters a to z (lowercase/uppercase), numbers and characters _, -, ..

Here is an example of file:

Multi line

If the text is long and you want to write it in several lines, you can type an anti-slash \ at the end of each line (excepted the last one of the text), to tell the parser to continue reading the translated string.

However, it doesn't insert a line break in the displayed string. If you want to insert a real line break, use \n or \r (\r\n on windows, \n on linux, \r on macs):

Comments

You can also put some comments. They have to begin with a #. When the parser sees #, the rest of the line is ignored. A comment can be at the beginning of a line, or in the middle of a line, or at the end of the line. If you want to use a # in a value, you have to escape it with an anti-slash: \#.

Whitespaces

Whitespaces before and after a value are ignored. If you want to put a value equal to a space, you have to use \s.

The value of space will be ' ', and the value of nospace, an empty string.

You can also use \S to insert an 'unbreakable' space.


All versions of properties-file with dependencies

PHP Build Version
Package Version
Requires php Version >=5.6.0
ext-mbstring Version >=5.6.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 jelix/properties-file contains the following files

Loading the files please wait ....