-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
26 changed files
with
445 additions
and
69 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,12 @@ | |
use Illuminate\Console\Command; | ||
use Todstoychev\Icr\Processor; | ||
|
||
/** | ||
* Rebuild images in particular context. | ||
* | ||
* @author Todor Todorov <[email protected]> | ||
* @package Todstoychev\Icr\Console | ||
*/ | ||
class RebuildCommand extends Command | ||
{ | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?php | ||
|
||
namespace Todstoychev\Icr\Exception; | ||
|
||
/** | ||
* Handles file limit exceeded error | ||
* | ||
* @author Todor Todorov <[email protected]> | ||
* @package Todstoychev\Icr\Exception | ||
*/ | ||
class FileLimitExceededException extends \Exception | ||
{ | ||
|
||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,12 @@ | |
|
||
namespace Todstoychev\Icr\Exception; | ||
|
||
/** | ||
* Handles cofiguration value validation error | ||
* | ||
* @author Todor Todorov <[email protected]> | ||
* @package Todstoychev\Icr\Exception | ||
*/ | ||
class InvalidConfigurationValueException extends \Exception | ||
{ | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,12 @@ | |
|
||
namespace Todstoychev\Icr\Exception; | ||
|
||
/** | ||
* Handles mandatory configuration value missing error | ||
* | ||
* @author Todor Todorov <[email protected]> | ||
* @package Todstoychev\Icr\Exception | ||
*/ | ||
class MandatoryConfigValueMissingException extends \Exception | ||
{ | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,12 @@ | |
|
||
namespace Todstoychev\Icr\Exception; | ||
|
||
/** | ||
* Handles non allowed file extension error | ||
* | ||
* @author Todor Todorov <[email protected]> | ||
* @package Todstoychev\Icr\Exception | ||
*/ | ||
class NonAllowedFileExtensionException extends \Exception | ||
{ | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,12 @@ | |
|
||
namespace Todstoychev\Icr\Exception; | ||
|
||
/** | ||
* Handles non allowed mime type error | ||
* | ||
* @author Todor Todorov <[email protected]> | ||
* @package Todstoychev\Icr\Exception | ||
*/ | ||
class NonAllowedMimeTypeException extends \Exception | ||
{ | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,12 @@ | |
|
||
namespace Todstoychev\Icr\Exception; | ||
|
||
/** | ||
* Handles non existing context name | ||
* | ||
* @author Todor Todorov <[email protected]> | ||
* @package Todstoychev\Icr\Exception | ||
*/ | ||
class NonExistingContextException extends \Exception | ||
{ | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,8 +2,23 @@ | |
|
||
namespace Todstoychev\Icr\Handler; | ||
|
||
/** | ||
* Handles delete image operations | ||
* | ||
* @author Todor Todorov <[email protected]> | ||
* @package Todstoychev\Icr\Handler | ||
*/ | ||
class DeleteImageHandler extends AbstractHandler | ||
{ | ||
/** | ||
* Delete only reized images and keeps the original image | ||
* | ||
* @param string $context | ||
* @param string $fileName | ||
* | ||
* @throws \Todstoychev\Icr\Exception\NonExistingArrayKeyException | ||
* @throws \Todstoychev\Icr\Exception\NonExistingContextException | ||
*/ | ||
public function deleteImageSizes($context, $fileName) | ||
{ | ||
$contextPath = public_path($this->getUploadsPath() . '/' . $context); | ||
|
@@ -15,6 +30,14 @@ public function deleteImageSizes($context, $fileName) | |
} | ||
} | ||
|
||
/** | ||
* Copletely deletes an image | ||
* | ||
* @param string $context | ||
* @param string $fileName | ||
* | ||
* @throws \Todstoychev\Icr\Exception\NonExistingArrayKeyException | ||
*/ | ||
public function deleteImage($context, $fileName) | ||
{ | ||
$this->deleteImageSizes($context, $fileName); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,13 @@ | |
|
||
use Todstoychev\Icr\Exception\ExtensionNotFoundException; | ||
|
||
/** | ||
* Handles existing image openning and creates the necessary image object, depending on the driver set | ||
* in the configuration. | ||
* | ||
* @author Todor Todorov <[email protected]> | ||
* @package Todstoychev\Icr\Handler | ||
*/ | ||
class OpenImageHandler extends AbstractHandler | ||
{ | ||
/** | ||
|
Oops, something went wrong.