diff --git a/File.class.php b/File.class.php index bb1f121..afd3c3a 100644 --- a/File.class.php +++ b/File.class.php @@ -79,6 +79,16 @@ abstract class File } /** + * Если объект содержит информацию о файле/изображение вернет - true + * Если объект пуст - вернет false + * @return bool + */ + public function getIsNoEmpty() + { + return (bool) $this->size; + } + + /** * @return string * TODO: Сделать настройку для изображения-заглушки применительно к Image */ diff --git a/Image.class.php b/Image.class.php index 2dd5bcf..306d753 100644 --- a/Image.class.php +++ b/Image.class.php @@ -38,9 +38,4 @@ class Image extends File { return parent::getImageVariant($size); } - - public function getIsNoEmpty() - { - return (bool) $this->size; - } } \ No newline at end of file