PHP code example of skyline / component-image-tool

1. Go to this page and download the library: Download skyline/component-image-tool 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/ */

    

skyline / component-image-tool example snippets



use Skyline\ImageTool\Controller\AbstractImageToolAPIController;

class MyAPIController extends AbstractImageToolAPIController {
    /**
     * @route literal /api/v1/image-tool/fetch
     */
    public function fetchAction() {
        parent::fetchQueryAction( $_POST );
    }
    
    /**
     * @route literal /api/v1/image-tool/change
     * @role SKYLINE.ADMIN
     * @role SKYLINE.IMAGES.CHANGE
     */
    public function changeAction() {
        parent::changeQueryAction( $_POST );
    }
    
    /**
     * @route literal /api/v1/image-tool/put
     * @role SKYLINE.ADMIN
     * @role SKYLINE.IMAGES.UPLOAD
     */
    public function putAction() {
        parent::putQueryAction( $_POST, $_FILES );
    }
}