From e97f584ebc9fdc1e378d440d8d48a818428f0f4d Mon Sep 17 00:00:00 2001 From: Alexander Demidov Date: Wed, 14 Aug 2013 22:17:21 +0400 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=D0=B8=D0=B5=20=D0=BA=D0=BE=D0=BC=D0=BC=D0=B5=D0=BD=D1=82?= =?UTF-8?q?=D0=B0=D1=80=D0=B8=D1=8F=20=D0=BA=20=D0=BC=D0=B5=D1=82=D0=BE?= =?UTF-8?q?=D0=B4=D1=83=20getIsNoEmpty()=20=D0=B8=20=D0=BF=D0=B5=D1=80?= =?UTF-8?q?=D0=B5=D0=BC=D0=B5=D1=89=D0=B5=D0=BD=D0=B8=D0=B5=20=D1=8D=D1=82?= =?UTF-8?q?=D0=BE=D0=B3=D0=BE=20=D0=BC=D0=B5=D1=82=D0=BE=D0=B4=D0=B0=20?= =?UTF-8?q?=D0=B2=20=D0=BA=D0=BB=D0=B0=D1=81=D1=81=20File?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- File.class.php | 10 ++++++++++ Image.class.php | 5 ----- 2 files changed, 10 insertions(+), 5 deletions(-) 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