1 <?php
2 /**
3 * @package FrameworkOnFramework
4 * @subpackage model
5 * @copyright Copyright (C) 2010-2016 Nicholas K. Dionysopoulos / Akeeba Ltd. All rights reserved.
6 * @license GNU General Public License version 2 or later; see LICENSE.txt
7 */
8 // Protect from unauthorized access
9 defined('FOF_INCLUDED') or die;
10
11 /**
12 * FrameworkOnFramework model behavior class
13 *
14 * @package FrameworkOnFramework
15 * @since 2.1
16 */
17 class FOFModelFieldBoolean extends FOFModelFieldNumber
18 {
19 /**
20 * Is it a null or otherwise empty value?
21 *
22 * @param mixed $value The value to test for emptiness
23 *
24 * @return boolean
25 */
26 public function isEmpty($value)
27 {
28 return is_null($value) || ($value === '');
29 }
30 }
31