Download the PHP package aedart/overload without Composer

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

Build Status Latest Stable Version Total Downloads Latest Unstable Version License

Deprecated - Overload

Package has been replaced by aedart/athenaeum

Provides means to dynamically deal with inaccessible properties, by implementing PHP's magic methods; __get(), __set(), __isset(), and __unset(). This package, however, enforces the usage of getters- and setters-methods, ensuring that if a property is indeed available, then its corresponding getter or setter method will be invoked. The term 'overload', in this context, refers to PHP’s own definition hereof. (http://php.net/manual/en/language.oop5.overloading.php)

Contents

When to use this

Generally speaking, magic methods can be very troublesome to use. For the most part, they prohibit the usage of auto-completion in IDEs and if not documented, developers are forced to read large sections of the source code, in order to gain understanding of what’s going on. Depending upon implementation, there might not be any validation, when dynamically assigning new properties to objects, which can break other components, which depend on the given object. In addition to this, it can also be very difficult to write tests for components that are using such magic methods.

This package will not be able to solve any of the mentioned problems, because at the end of the day, as a developer, you still have to ensure that the code readable / understandable, testable and documented. Therefore, I recommend that this package only to be used, if and only if, the following are all true;

How to install

This package uses composer. If you do not know what that is or how it works, I recommend that you read a little about, before attempting to use this package.

Quick start

A Typical Class

Tip: PHPDoc

When using PHP’s magic methods, for overloading properties, it is a very good idea to make use pf PHPDoc's @property-tag. Most IDEs can read it and make use of it to provide auto-completion. See http://www.phpdoc.org/docs/latest/references/phpdoc/tags/property.html

Naming convention applied

Property names

This package assumes that you properties either follow CamelCase or Snake Case standard. Consider the following examples:

Getter / Setter names

Getters and setters follow a most strict naming convention; the must follow camelCase and be prefixed with get for getter methods and set for setter methods. In addition, the package uses the following syntax / rule when searching for a property’s corresponding getter or setter:

Above stated syntax / rule is expressed in EBFN

Examples:

Protected vs. Private properties

By default, only protected properties are going to be made accessible (or overloaded, if you will). This means that private declared properties are not going to be available.

Behaviour override

Should you wish to also expose your private declared properties, then this behaviour can be set per object, from an inside scope.

For further reference, read documentation in Overload/Traits/Helper/PropertyAccessibilityTrait

Custom usage

If you do not need the full property overload methods, e.g. you only wish to be able to get and set, but not to unset properties, then you can make use of the sub-traits, which the PropertyOverloadTrait is composed of.

However, when using individually, you must also include the Aedart\Overload\Traits\Helper\ReflectionTrait or the individual traits are not going to work as expected; A fatal error will be thrown, stating that it cannot find various methods!

Each of the below listed traits can be used by themselves, without being dependent on each other.

Trait Description Namespace
ReflectionTrait Must always be included Aedart\Overload\Traits\Helper\ReflectionTrait
GetterInvokerTrait Implements __get() Aedart\Overload\Traits\GetterInvokerTrait
SetterInvokerTrait Implements __set() Aedart\Overload\Traits\SetterInvokerTrait
IssetInvokerTrait Implements __isset() Aedart\Overload\Traits\IssetInvokerTrait
UnsetInvokerTrait Implements __unset() Aedart\Overload\Traits\UnsetInvokerTrait

Contribution

Have you found a defect ( bug or design flaw ), or do you wish improvements? In the following sections, you might find some useful information on how you can help this project. In any case, I thank you for taking the time to help me improve this project's deliverables and overall quality.

Bug Report

If you are convinced that you have found a bug, then at the very least you should create a new issue. In that given issue, you should as a minimum describe the following;

When time permits it, I will review your issue and take action upon it.

Fork, code and send pull-request

A good and well written bug report can help me a lot. Nevertheless, if you can or wish to resolve the defect by yourself, here is how you can do so;

As soon as I receive the pull-request (and have time for it), I will review your changes and merge them into this project. If not, I will inform you why I choose not to.

Versioning

This package follows Semantic Versioning 2.0.0

License

BSD-3-Clause, Read the LICENSE file included in this package


All versions of overload with dependencies

PHP Build Version
Package Version
Requires php Version >=7.1.0
illuminate/support Version 5.6.*
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 aedart/overload contains the following files

Loading the files please wait ....