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