Download the PHP package serafim/properties without Composer

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

PHP Properties

Travis CI Scrutinizer CI Latest Stable Version Latest Unstable Version License MIT Total Downloads

PHP Properties implementations based on getters or setters method and used PSR-5 PHPDoc information.

Installation

composer require serafim/properties

Package on packagist.org

Introduction

Properties provide the ability to control the behavior of setting and retrieving data from an object fields.

There are no properties at the language level, but they can be implemented with the some additional functionality.

For example:

This code example does not provide type-hint and autocomplete. Using magic without the ability to control it is always a bad option. ...well, it looks awful %)

We can fix some problems using PSR-5. In this case, we can add a docblock.

But this docblock only adds information for the IDE and does not affect the code itself. At the same time, you should always keep it up to date.

But wait! We have another problem.

This is obviously a bug. We still need to add __isset, __unset and __set support.

It's damn awful!!111

Properties Usage

Now let's see what the serafim/properties package provides.

Readonly Properties

To indicate that the type should be readonly use @property-read annotation.

Writeonly Properties

To indicate that the type should be readonly use @property-write annotation.

Getters And Setters

For getter or setter override just declare get[Property] (is[Property] for bool values will be works too) or set[Property] methods.

Setter:

Autocomplete

All these annotations fully work in the IDE, including autocomplete and highlighting incorrect behavior.

IDE Autocomplete And Highlighting

Type Hints

All properties with writeable behavior will be "type checkable".

Primitive Type Hints

Arrays And Generics

Conjunction And Disjunction

See more: https://github.com/phpDocumentor/fig-standards/blob/master/proposed/phpdoc.md#appendix-a-types

Production Mode

The code is quite effective, but in the production mode you should use caching. The package implements support for the PSR-16 standard.


All versions of properties with dependencies

PHP Build Version
Package Version
Requires php Version ^7.1.3
railt/parser Version 1.2.*
railt/lexer Version 1.2.*
psr/simple-cache Version ~1.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 serafim/properties contains the following files

Loading the files please wait ....