primo commit
This commit is contained in:
30
libraries/f0f/model/field/boolean.php
Normal file
30
libraries/f0f/model/field/boolean.php
Normal file
@ -0,0 +1,30 @@
|
||||
<?php
|
||||
/**
|
||||
* @package FrameworkOnFramework
|
||||
* @subpackage model
|
||||
* @copyright Copyright (C) 2010-2016 Nicholas K. Dionysopoulos / Akeeba Ltd. All rights reserved.
|
||||
* @license GNU General Public License version 2 or later; see LICENSE.txt
|
||||
*/
|
||||
// Protect from unauthorized access
|
||||
defined('F0F_INCLUDED') or die;
|
||||
|
||||
/**
|
||||
* FrameworkOnFramework model behavior class
|
||||
*
|
||||
* @package FrameworkOnFramework
|
||||
* @since 2.1
|
||||
*/
|
||||
class F0FModelFieldBoolean extends F0FModelFieldNumber
|
||||
{
|
||||
/**
|
||||
* Is it a null or otherwise empty value?
|
||||
*
|
||||
* @param mixed $value The value to test for emptiness
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function isEmpty($value)
|
||||
{
|
||||
return is_null($value) || ($value === '');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user