Download the PHP package aqilixapi/image without Composer

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

aqilixapi-image

Images API Handler

This module is purposed to handle image for an API (create/upload, read, update, delete). It use MySQL with Doctrine ORM. This module is extendable to use another database adapter.

Currently this module has support these resources with required OAuth2 Authentication

To retrieve the access token, you can use this resource POST /oauth by use some params:

Dependencies

Installation

This is a ZF2/Apigility module, so to use it on your ZF2/Apigility project, need to add repositories and require on composer.json.

Run composer update then enable the module on config/application.config.php

Configuration

Because of this module use doctrine/doctrine-orm-module, we just need to configure database credential using configuration file. I prepare the config file here config/doctrine.local.php.dst. Just copy this file to config/autoload/doctrine.local.php and change the connection params

After that, we need to configure the image path, thumbnail path, original file path and Asset Manager path. The configuration file is here config/aqilixapi.image.local.php.dist. Copy this file to config/autoload/aqilixapi.image.local.php and adjust these configuration

Make sure those paths are exists and writeable by Web Server, but if you just use PHP built in web server for development you don't need to change their permissions.

OAuth2

To enable OAuth2 Authentication, just copy default configuration files (config/oauth2.doctrine-orm.local.php.dist, config/oauth2.local.php.dist) to config/autoload/oauth2.doctrine-orm.local.php and config/autoload/oauth2.local.php.

We also able to configure authorization based on Scope. Currently ACL by Scope just supported by Client Credentials Grant Type. This is caused by limitation from ZF-OAUTH2. To add another Grant Type we should extend the ZF-OAUTH2 code. For configuration, just add configuration mentioned above (config/autoload/aqilixapi.image.local.php)

Define Scope name as key, and define resource and method wanna be authorized.

Database

This module use a tables image, user and another tables for OAuth2. Currently it use MySQL, but you can change it based on your need easily as long as the database is supported by Doctrine ORM. If you have follow instructions above, it mean just remain creating the database table.

To do that just run this command from app skeleton working directory

Table will be created and if you wanna try the API with sample data. I have prepare them on the source code. Please run this command

Then run the API

Example

Here are some screenshots I made while trying the API. I use Postman Chrome Extension as REST Client. You can use the same data with the screenshots, because I make it same in Data Fixtures.

Request Access Token From OAuth Using Credential, Client ID and Client Secret

Request Access Token From OAuth Using Credential, Client ID and Client Secret

Then use the access token on Authorization Header while send Request to API

Upload Image Using POST MethodUpload Image Using POST Method

Retrieve The Uploaded Image Using GET MethodRetrieve The Uploaded Image Using GET Method

Update Image Using PATCH MethodUpdate Image Using PATCH Method

Retrieve Images Collection Using GET MethodRetrieve Images Collection Using GET Method

Retrieve Images Collection Using GET Method

Delete Image Using DELETE MethodDelete Image Using DELETE Method

All versions of image with dependencies

PHP Build Version
Package Version
Requires php Version >=5.3.3
doctrine/doctrine-orm-module Version =0.8.0
zfcampus/zf-oauth2-doctrine Version 0.3.5
hounddog/doctrine-data-fixture-module Version 0.0.4
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 aqilixapi/image contains the following files

Loading the files please wait ....