Download the PHP package echobot/angularphp without Composer

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

AngularPHP

AngularPHP provides a bridge between PHP classes and AngularJS, by automatically exposing selected classes, methods & properties as AngularJS services. Calls to these exported methods are routed to the same object on the server, with the result being passed back to the caller via a promise. Every instance of an exported class is automatically converted to and from its equivalent when passing through AngularPHP.

Installation

Install via Composer:

Usage

In your project framework of choice, set up a route which passes the current request to AngularPHP and which renders the response. To assist in this, two utility classes exist which achieve this, depending on what framework you are using.

Laravel

The Echobot\AngularPHP\Endpoints\Laravel provides a Laravel-compatible endpoint, which can be easily used to create an AngularPHP endpoint on a particular route:

That snippet serves up all exported classes in the models directory, from the route /models.js.

PHP

The Echobot\AngularPHP\Endpoints\PHPBuiltIn class can be used to serve requests based on the $_SERVER global variable, which includes most old frameworks and PHP's built-in command-line web server.

Other Frameworks

One can use the Echobot\AngularPHP\Endpoints\PHPBuiltIn as an example to see how the endpoint class extends the AngularPHP class in order to improve the ease of use for a given framework. Using this example, creating a new endpoint for an unsupported framework should be relatively simple.

Example

The following example defines an AngularPHP endpoint which exposes a single class (ExampleClass) in an AngularJS module called ExampleModule:

Echobot\AngularPHP\Endpoints\PHPBuiltIn is an endpoint which understands the standard PHP request representation ($_SERVER). An endpoint for Laravel is also included in .

IDs

AngularPHP allows the specification of one or more properties as containing the object's unique ID by adding @Id to the property's DocComment. Any object passing through AngularPHP with a known ID will return a reference to the existing object, allowing one object with a given ID to only exist once in AngularJS. For example, if you return a user twice from the backend, the second returned value will be a reference to the first, as they share an ID.

Read-Only Properties

By adding @ReadOnly to the DocComment of an exported property, the value of this property will not be passed back from the AngularJS module, and will not be updated on the specified object/class.

Inheritance

AngularPHP strives to fully respect inheritance, provided the classes in the inheritance chain are also exported.

Security

Beyond limiting access to exported methods & properties, AngularPHP leaves security entirely up to you. This is a curse and a blessing - it's won't stop you doing what you want, but it's up to you to secure it.

Caution!

This code is relatively untested. We've had a lot of success with it, but one should be prepared for unintended behaviour. Any bug fixes will be gratefully received.


All versions of angularphp 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 echobot/angularphp contains the following files

Loading the files please wait ....