2017 © Pedro Peláez
 

cakephp-plugin cakephp-utils

Some utils for CakePHP 3.x like an Uploadable Behaviour for AmazonS3

image

whiterabbit/cakephp-utils

Some utils for CakePHP 3.x like an Uploadable Behaviour for AmazonS3

  • Saturday, January 30, 2016
  • by italopalanza
  • Repository
  • 5 Watchers
  • 0 Stars
  • 46 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

cakephp-utils

Installation

You can install the plugin cackephp-utils into your CakePHP application using composer and executing the following lines in the root of your application., (*1)

composer require whiterabbit/cackephp-utils 

Configuration

You will need to add the following line to your application's bootstrap.php file:, (*2)

Plugin::load('WRUtils');

And in your AppController add, (*3)

use WRUtils\Controller\WRTrait;

class AppController extends Controller
{
    use WRTrait;
}

In order to pass a customer name / site to the UploadableBehavior you have to put it in the parameter session Auth.User.customer_site (ie from AppController):, (*4)

$this->request->session()->write('Auth.User.customer_site', 'my.customer.site');

For the S3File Helper, in your AppController add, (*5)

public function initialize() {
    $this->helpers[] = 'WRUtils.S3File';
}

version

0.2.1 - S3FileHelper: Set the default image instead of an html code - Added a customer site name to the uploadable behavior in order to create, in S3, separate bucket for different customers.
if you want use this feature add the parameter Auth.User.customer_site in your session, (*6)

0.1.3.1 Solved sum bug on S3FileHelper, (*7)

0.1.3 Added S3FileHelper helper, (*8)

0.1.2 Added folder management for S3, (*9)

0.1.1 Initial release, (*10)

License

The MIT License (MIT), (*11)

Copyright (c) 2016 WhiteRabbit by Dino Fratelli, (*12)

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:, (*13)

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software., (*14)

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE., (*15)

The Versions

30/01 2016

dev-master

9999999-dev

Some utils for CakePHP 3.x like an Uploadable Behaviour for AmazonS3

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar dinofratelli