Skip to content

Commit 87e698c

Browse files
committed
image component
1 parent c919007 commit 87e698c

File tree

3 files changed

+27
-1
lines changed

3 files changed

+27
-1
lines changed

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@
3131
"phpixie/auth-login": "~3.0",
3232
"phpixie/auth-processors": "~3.0",
3333
"phpixie/paginate": "~3.0",
34-
"phpixie/paginate-orm": "~3.0"
34+
"phpixie/paginate-orm": "~3.0",
35+
"phpixie/image": "~3.0"
3536
},
3637
"require-dev": {
3738
"phpixie/test": "~3.0"

src/PHPixie/Framework/Components.php

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,15 @@ public function validate()
177177
{
178178
return $this->instance('validate');
179179
}
180+
181+
/**
182+
* Validate
183+
* @return \PHPixie\Image
184+
*/
185+
public function image()
186+
{
187+
return $this->instance('image');
188+
}
180189

181190
/**
182191
* @param string $name
@@ -364,6 +373,16 @@ protected function buildValidate()
364373
{
365374
return new \PHPixie\Validate();
366375
}
376+
377+
/**
378+
* @return \PHPixie\Image
379+
*/
380+
protected function buildImage()
381+
{
382+
return new \PHPixie\Image(
383+
$this->configuration->imageDefaultDriver()
384+
);
385+
}
367386

368387
/**
369388
* @return Configuration

src/PHPixie/Framework/Configuration.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,4 +78,10 @@ public function authConfig();
7878
* @return Repositories
7979
*/
8080
public function authRepositories();
81+
82+
/**
83+
* Name of the default driver to use with Image component
84+
* @return string
85+
*/
86+
public function imageDefaultDriver();
8187
}

0 commit comments

Comments
 (0)