Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

executable file 38 lines (29 sloc) 0.672 kb
<?php
namespace Gregwar\ImageBundle;
use Gregwar\ImageBundle\Image;
/**
* Image manipulation class
*
* @author Gregwar <g.passault@gmail.com>
*/
class ImageHandler extends Image
{
protected $fileCallback = null;
/**
* Defines the callback to call to compute the new filename
*/
public function setFileCallback($file)
{
$this->fileCallback = $file;
}
/**
* When processing the filename, call the callback
*/
protected function getFilename($filename)
{
$callback = $this->fileCallback;
if (null === $callback)
return $filename;
return $callback($filename);
}
}
Jump to Line
Something went wrong with that request. Please try again.