Data.php 360 B

1234567891011121314151617181920212223242526
  1. <?php
  2. namespace Gregwar\Image\Source;
  3. /**
  4. * Having image in some string
  5. */
  6. class Data extends Source
  7. {
  8. protected $data;
  9. public function __construct($data)
  10. {
  11. $this->data = $data;
  12. }
  13. public function getData()
  14. {
  15. return $this->data;
  16. }
  17. public function getInfos()
  18. {
  19. return sha1($this->data);
  20. }
  21. }