12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- <?php
- /**
- * Created by PhpStorm.
- * User: robin
- * Date: 11/24/15
- * Time: 12:53 PM
- */
-
- namespace app\Http\Business\Cameras;
-
- use App\Http\DBO\CamerasDbo;
- use App\Http\DBO\CamerasImageDbo;
- use Imagine\Imagick\Image;
- use Imagine\Imagick\Imagine;
-
- abstract class AbstractCamera
- {
- /**
- * @var CamerasDbo
- */
- protected $_camera;
- /**
- * @var $_imagine Imagine
- */
- protected $_imagine;
- /**
- * @var $_image Image
- */
- protected $_image;
-
- public function __construct(CamerasDbo $camera)
- {
- $this->_camera = $camera;
- $this->_imagine = new Imagine();
- }
-
- /**
- * @return CamerasImageDbo
- */
- public function getImage()
- {
- $this->prepareImage();
- $imageDbo = new CamerasImageDbo();
- $imageDbo->setImage(base64_encode($this->_image->get("jpeg")));
- return $imageDbo;
- }
-
- public abstract function prepareImage();
- }
|