You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

36 lines
798 B

<?php
class Image extends File
{
public $width;
public $height;
public $type;
public $size;
public $original_filename;
public $variants = array();
protected $sizes;
/**
* @param $class string
* @throws ErrorException
*/
public static function checkSubClass($class)
{
if (is_null($class) || $class == '') {
throw new ErrorException('Class not defined.');
}
if (!class_exists($class)) {
throw new ErrorException('Class "' . $class . '" not exists.');
}
if (get_parent_class($class) != 'Image') {
throw new ErrorException('Class "' . $class . '" mast be extend of "Image".');
}
}
public function getSizes()
{
return $this->sizes;
}
}