Arbit - project tracking

PHPillow - PHP CouchDB connector

Browse source code

File: / src/ classes/ validator/ boolean.php

Type
text/plain text/plain
Last Author
jakob
Version
169
Line Rev. Author Source
1 169 jakob <?php
2 jakob /**
3 jakob * phpillow CouchDB backend
4 jakob *
5 jakob * This file is part of phpillow.
6 jakob *
7 jakob * phpillow is free software; you can redistribute it and/or modify it under
8 jakob * the terms of the GNU Lesser General Public License as published by the Free
9 jakob * Software Foundation; version 3 of the License.
10 jakob *
11 jakob * phpillow is distributed in the hope that it will be useful, but WITHOUT ANY
12 jakob * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
13 jakob * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
14 jakob * more details.
15 jakob *
16 jakob * You should have received a copy of the GNU Lesser General Public License
17 jakob * along with phpillow; if not, write to the Free Software Foundation, Inc., 51
18 jakob * Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19 jakob *
20 jakob * @package Core
21 jakob * @version $Revision: 169 $
22 jakob * @license http://www.gnu.org/licenses/lgpl-3.0.txt LGPL
23 jakob */
24 jakob
25 jakob /**
26 jakob * validate boolean inputs
27 jakob *
28 jakob * @package Core
29 jakob * @version $Revision: 169 $
30 jakob * @license http://www.gnu.org/licenses/lgpl-3.0.txt LGPL
31 jakob */
32 jakob class phpillowBooleanValidator extends phpillowValidator
33 jakob {
34 jakob /**
35 jakob * Validate input as a boolean
36 jakob *
37 jakob * @param mixed $input
38 jakob * @return bool
39 jakob */
40 jakob public function validate( $input )
41 jakob {
42 jakob return (bool) $input;
43 jakob }
44 jakob }