Adapter.php 820 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <?php
  2. namespace Gregwar\Image\Adapter;
  3. use Gregwar\Image\Source\Source;
  4. /**
  5. * Base Adapter Implementation to handle Image information
  6. */
  7. abstract class Adapter implements AdapterInterface
  8. {
  9. /**
  10. * @var Source
  11. */
  12. protected $source;
  13. /**
  14. * The image resource handler
  15. */
  16. protected $resource;
  17. public function __construct(){
  18. }
  19. /**
  20. * @inheritdoc
  21. */
  22. public function setSource(Source $source)
  23. {
  24. $this->source = $source;
  25. return $this;
  26. }
  27. /**
  28. * @inheritdoc
  29. */
  30. public function getResource()
  31. {
  32. return $this->resource;
  33. }
  34. /**
  35. * Does this adapter supports the given type ?
  36. */
  37. protected function supports($type)
  38. {
  39. return false;
  40. }
  41. /**
  42. * Converts the image to true color
  43. */
  44. protected function convertToTrueColor()
  45. {
  46. }
  47. }