This repository has been archived by the owner on Mar 9, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
git-svn-id: svn://arbitracker.org/phpillow/trunk@169 c9640fd1-f2a0-481e-a8e5-009dc8289155
- Loading branch information
1 parent
a469ab0
commit 7eebc3e
Showing
1 changed file
with
44 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
<?php | ||
/** | ||
* phpillow CouchDB backend | ||
* | ||
* This file is part of phpillow. | ||
* | ||
* phpillow is free software; you can redistribute it and/or modify it under | ||
* the terms of the GNU Lesser General Public License as published by the Free | ||
* Software Foundation; version 3 of the License. | ||
* | ||
* phpillow is distributed in the hope that it will be useful, but WITHOUT ANY | ||
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS | ||
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for | ||
* more details. | ||
* | ||
* You should have received a copy of the GNU Lesser General Public License | ||
* along with phpillow; if not, write to the Free Software Foundation, Inc., 51 | ||
* Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | ||
* | ||
* @package Core | ||
* @version $Revision$ | ||
* @license http://www.gnu.org/licenses/lgpl-3.0.txt LGPL | ||
*/ | ||
|
||
/** | ||
* validate boolean inputs | ||
* | ||
* @package Core | ||
* @version $Revision$ | ||
* @license http://www.gnu.org/licenses/lgpl-3.0.txt LGPL | ||
*/ | ||
class phpillowBooleanValidator extends phpillowValidator | ||
{ | ||
/** | ||
* Validate input as a boolean | ||
* | ||
* @param mixed $input | ||
* @return bool | ||
*/ | ||
public function validate( $input ) | ||
{ | ||
return (bool) $input; | ||
} | ||
} |