1 | <?php |
||
31 | class Image implements ImageInterface { |
||
32 | |||
33 | use IntegerHeightTrait; |
||
34 | use IntegerSizeTrait; |
||
35 | use IntegerWidthTrait; |
||
36 | use StringDirectoryTrait; |
||
37 | use StringExtensionTrait; |
||
38 | use StringFilenameTrait; |
||
39 | use StringMimeTypeTrait; |
||
40 | use StringPathnameTrait; |
||
41 | |||
42 | /** |
||
43 | * Constructor. |
||
44 | * |
||
45 | * @param string $pathname The pathname. |
||
46 | */ |
||
47 | public function __construct($pathname) { |
||
50 | |||
51 | /** |
||
52 | * Get the dimensions. |
||
53 | * |
||
54 | * @return int[] Returns the dimensions. |
||
55 | */ |
||
56 | public function getDimensions() { |
||
59 | |||
60 | /** |
||
61 | * Get the orientation. |
||
62 | * |
||
63 | * @return string|null Returns the orientation, null if width and height are equals. |
||
64 | */ |
||
65 | public function getOrientation() { |
||
77 | |||
78 | /** |
||
79 | * Initialize. |
||
80 | * |
||
81 | * @return Image Returns this image. |
||
82 | */ |
||
83 | public function init() { |
||
105 | |||
106 | /** |
||
107 | * Resize. |
||
108 | * |
||
109 | * @param int $newWidth The new width. |
||
110 | * @param int $newHeight The new height. |
||
111 | * @param string $pathname The pathname. |
||
112 | * @return bool Returns true in case of success, false otherwise. |
||
113 | * @throws RuntimeException Throws a runtime exception if the re-sampled copy failed. |
||
114 | */ |
||
115 | public function resize($newWidth, $newHeight, $pathname) { |
||
132 | |||
133 | /** |
||
134 | * Set the pathname. |
||
135 | * |
||
136 | * @param string $pathname The pathname. |
||
137 | * @return Image Returns this image. |
||
138 | * @throws InvalidArgumentException Throws an invalid argument exception if the pathname was not found. |
||
139 | */ |
||
140 | protected function setPathname($pathname) { |
||
147 | } |
||
148 |