Skip to content

Commit

Permalink
image component
Browse files Browse the repository at this point in the history
  • Loading branch information
dracony committed Mar 6, 2016
1 parent c919007 commit 87e698c
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 1 deletion.
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@
"phpixie/auth-login": "~3.0",
"phpixie/auth-processors": "~3.0",
"phpixie/paginate": "~3.0",
"phpixie/paginate-orm": "~3.0"
"phpixie/paginate-orm": "~3.0",
"phpixie/image": "~3.0"
},
"require-dev": {
"phpixie/test": "~3.0"
Expand Down
19 changes: 19 additions & 0 deletions src/PHPixie/Framework/Components.php
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,15 @@ public function validate()
{
return $this->instance('validate');
}

/**
* Validate
* @return \PHPixie\Image
*/
public function image()
{
return $this->instance('image');
}

/**
* @param string $name
Expand Down Expand Up @@ -364,6 +373,16 @@ protected function buildValidate()
{
return new \PHPixie\Validate();
}

/**
* @return \PHPixie\Image
*/
protected function buildImage()
{
return new \PHPixie\Image(
$this->configuration->imageDefaultDriver()
);
}

/**
* @return Configuration
Expand Down
6 changes: 6 additions & 0 deletions src/PHPixie/Framework/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,4 +78,10 @@ public function authConfig();
* @return Repositories
*/
public function authRepositories();

/**
* Name of the default driver to use with Image component
* @return string
*/
public function imageDefaultDriver();
}

0 comments on commit 87e698c

Please sign in to comment.