Download the PHP package phpextra/common without Composer

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

Common classes and interfaces for PHP

Latest Stable Version Total Downloads License Build Status Scrutinizer Code Quality Code Coverage GitTip

Usage

Enum (PHPExtra\Type\Enum)

Create your first enum type by creating a new class:

Thats all.

Now you can use it:

If no default value will be specified, you must set it as a constructor argument. If given constructor value will be invalid, \UnexpectedValueException will be thrown.

Collection (PHPExtra\Type\Collection)

Collections solve few things by implementing following interfaces: \Countable, \ArrayAccess, \Iterator, and \SortableInterface. This gives you an ability to count() collection, use a foreach on it, access it like an array $a[1] and sort its contents $a->sort($sorter). Apart from regular collections there are also LazyCollection's that allow you to specify a closure that will initialize collection contents only if and when it's needed.

Create your first collection:

Use it:

Lazy collection example:

UnknownType (PHPExtra\Type\UnknownType)

It should not happen but sometimes does - you have a method with many different response types, but want to handle it like a pro:

UnknownType can be extended and customized :-)

Paginator (PHPExtra\Paginator)

Paginator is fully compatible with CollectionInterface. It's task is to split large collections into pages.

Changelog

1.2.x

1.1.1

1.1.0

1.0.3 (cannot be downgraded)

1.0.2 (cannot be downgraded)

1.0.1 (cannot be downgraded)

1.0.0

First release

Installation (Composer)

Running tests

Contributing

All code contributions must go through a pull request. Fork the project, create a feature branch, and send me a pull request. To ensure a consistent code base, you should make sure the code follows the coding standards. If you would like to help take a look at the list of issues.

Requirements

See composer.json for a full list of dependencies.

Authors

Jacek Kobus - [email protected]

License information

See the file LICENSE.txt for copying permission.

All versions of common with dependencies

PHP Build Version
Package Version
No informations.
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 phpextra/common contains the following files

Loading the files please wait ....