Skip to content

Commit

Permalink
removed all traces of worker
Browse files Browse the repository at this point in the history
  • Loading branch information
iveoles committed Apr 25, 2014
1 parent 2c79b75 commit e4ac3fa
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 22 deletions.
10 changes: 1 addition & 9 deletions src/Iveoles/Image/Image.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,19 @@

class Image {

private $worker;
private $cache;
private $cacheLifetime; // minutes

private $pathStringbase = '';
private $pathString;


public function __construct($worker, \Illuminate\Cache\CacheManager $cache, $cacheLifetime, $pathString) {
$this->worker = $worker;
public function __construct(\Illuminate\Cache\CacheManager $cache, $cacheLifetime, $pathString) {
$this->cache = $cache;
$this->cacheLifetime = $cacheLifetime;
$this->pathStringBase = $pathString . '?';
}


public function getWorker() {
return $this->worker;
}


public function responsive(/* any number of params */) {
$params = func_get_args();
if(count($params) <= 1) {
Expand Down
14 changes: 1 addition & 13 deletions src/Iveoles/Image/ImageServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,24 +27,13 @@ public function register()

Config::package('iveoles/image', __DIR__.'/../../config');

$this->registerWorker();
$this->registerCache();
$this->registerImage();

$this->registerCommands();

}


private function registerWorker() {

$this->app->bind('iveoles.image.worker', function() {
return \Imagecow\Image::create(Config::get('image::worker'));
});

}


private function registerCache() {

$this->app->bind('iveoles.image.cache', function() {
Expand All @@ -65,8 +54,7 @@ private function registerImage() {
$app = $this->app;

$this->app->bind('iveoles.image', function() use ($app) {
return new \Iveoles\Image\Image($app['iveoles.image.worker'],
$app['iveoles.image.cache'],
return new \Iveoles\Image\Image($app['iveoles.image.cache'],
Config::get('image::cache.lifetime'),
Config::get('image::route'));
});
Expand Down

0 comments on commit e4ac3fa

Please sign in to comment.