PHP code example of aqilixapi / image

1. Go to this page and download the library: Download aqilixapi/image library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

aqilixapi / image example snippets


return array(
    'modules' => array(
       .
       .
       .
       'AqilixAPI\\Image', 
       'ZF\\OAuth2\\Doctrine',
       'DoctrineDataFixtureModule'
    )
)

    'connection' => array(
        'orm_default' => array(
            'driverClass' => 'Doctrine\\DBAL\\Driver\\PDOMySql\\Driver',
            'params' => array(
                'host'     => '127.0.0.1',
                'dbname'   => 'apigility',
                'user'     => 'apigility',
                'password' => 'apigility',
            ),
        ),
    ),

    'asset_manager' => array(
        'resolver_configs' => array(
            'paths' => array(
                'data/upload',
            ),
        ),
    ),
    'images' => array(
        'asset_manager_resolver_path' => 'data/upload',
        'target' => 'data/upload/images/img',
        'thumb_path' => 'data/upload/images/thumbs',
        'ori_path'   => 'data/upload/images/ori',
    ),


    'authorization' => array(
        'scopes' => array(
            'post' => array(
                'resource' => 'AqilixAPI\Image\V1\Rest\Image\Controller::collection',
                'method' => 'POST',
            ),
            'update' => array(
                'resource' => 'AqilixAPI\Image\V1\Rest\Image\Controller::entity',
                'method' => 'PATCH',
            ),
            'delete' => array(
                'resource' => 'AqilixAPI\Image\V1\Rest\Image\Controller::entity',
                'method' => 'DELETE',
            )
        )
    ),