Adapter.php 903 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. /**
  21. * {@inheritdoc}
  22. */
  23. public function setSource(Source $source)
  24. {
  25. $this->source = $source;
  26. return $this;
  27. }
  28. /**
  29. * {@inheritdoc}
  30. */
  31. public function getResource()
  32. {
  33. return $this->resource;
  34. }
  35. /**
  36. * Does this adapter supports the given type ?
  37. */
  38. protected function supports($type)
  39. {
  40. return false;
  41. }
  42. /**
  43. * Converts the image to true color.
  44. */
  45. protected function convertToTrueColor()
  46. {
  47. }
  48. }