Download the PHP package sagittariusx/beluga.dynamic-properties without Composer

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

Beluga.DynamicProperties

This is an PHP7 implementation to easy generate an little bit of "magic" extra functionality to you're PHP classes.

If you extend you're class from one of the classes of \Beluga\DynamicProperties so it adds dynamic class instance properties with read or read+write access. It requires only the presence of some get*() and/or set*() methods.

Installation

Install it via

or inside the composer.json:

Usage

The usage is really simple.

Why should I use dynamic properties?

You should not use it but you can, if you see the advantages.

Most modern IDE's like PHPStorm or Netbeans supports the dynamic properties with the code completion feature if the Properties have the correct PHP-Doc tag notation.

It means for example, if you provide a dynamic readonly property with the name $foo of type string

For read + write access you only have to replace @property-read with @property.

Dynamic property read access

If you have an class that define methods for getting some instance properties and they are with an name format like getPropertyName1() or getPropertyName2() etc. pp. You only must extend the class from the \Beluga\DynamicProperties\ExplicitGetter class and you can access the Properties directly like $myClassInstance->propertyName1 or $myClassInstance->propertyName2 for read access.

The class will always work like before but with the extra properties.

Remember to do not forget to write the required class documentation for the dynamic available read only properties, like in the example doc-block below.

Dynamic property read+write access

If you also need write access to the properties you must replace the Beluga\DynamicProperties\ExplicitGetter with the Beluga\DynamicProperties\ExplicitGetterSetter class and implement the required set???() methods

Special cases: Ignore Getters and/or Setters

Often not all get and/or set methods should be usable as dynamic properties.

For this cases you can explicit declare the names of the properties that should not be accessible by the dynamic way.

For it you have to define this dynamic property names inside the constructor of the extending class:


All versions of beluga.dynamic-properties 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 sagittariusx/beluga.dynamic-properties contains the following files

Loading the files please wait ....