Download the PHP package openclassrooms/service-proxy without Composer

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

Service Proxy

Build Status SensioLabsInsight PHPStan PHP

Service Proxy is a library that provides functionality to manage technical code over a class:

Installation

The easiest way to install ServiceProxy is via composer.

Create the following composer.json file and run the php composer.phar install command to install it.

Concepts

Interceptors

Interceptors are used as decorators to react to the method execution. for example using @Cache annotation, is a condition to enable the cache interceptor.

There is two types of interceptors:

Prefix interceptors :

Interceptors that are called before the method execution, they must implement OpenClassrooms\ServiceProxy\Interceptor\Contract\PrefixInterceptor Three methods are called:

Suffix interceptors :

Interceptors that are called after the method execution, even if an exception is thrown, they must implement OpenClassrooms\ServiceProxy\Interceptor\Contract\SuffixInterceptor Three methods are called:

Handling exceptions

If you want to react to an exception thrown by the method, you can check for the exception in the suffix interceptor.

Early return

You can create your own interceptors, or use the built-in ones:

Handlers

Handlers are used by interceptors to manage the infrastructure code. To be able to use built-in interceptors, you need to implement the built-in handlers contracts.

example:

Usage

Instantiation

Symfony

Check out the ServiceProxyBundle. The bundle provides an easy configuration option for this library.

Manual

Example

First implement the handlers

Then you can inject the handlers into the interceptors:

Built-in interceptors

Acknowledgments

This library is based on Ocramius\ProxyManager.


All versions of service-proxy with dependencies

PHP Build Version
Package Version
Requires php Version >=8.1
doctrine/annotations Version ^1.2
friendsofphp/proxy-manager-lts Version ^1.0
symfony/expression-language Version ^5.0 || ^6.0
symfony/filesystem Version ^5.0 || ^6.0
symfony/property-info Version ^5.0 || ^6.0
phpdocumentor/reflection-docblock Version ^5.0
phpstan/phpdoc-parser Version ^1.24
webmozart/assert Version ^1.11
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 openclassrooms/service-proxy contains the following files

Loading the files please wait ....