Skip to content
This repository
tree: c79ad79cb5
Fetching contributors…

Cannot retrieve contributors at this time

file 60 lines (53 sloc) 1.019 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60
<?php
/**
* @package Morph
* @subpackage Property
* @author Jonathan Moss <xirisr@gmail.com>
* @copyright Jonathan Moss 2009
*/

/**
* Class to represent an boolean property
*
* @package Morph
* @subpackage Property
*/
class Morph_Property_Boolean extends Morph_Property_Generic
{

    /**
* The minimum allowed value
* @var integer
*/
protected $Minimum;

/**
* The maximum allowed value
* @var integer
*/
protected $Maximum;

/**
* @param string $name
* @param boolean $default
*/
public function __construct($name, $default = null){
if (!is_null($default)) {
$default = (boolean)$default;
}
parent::__construct($name, $default);
}

/**
* Sets the value of this attribute
*
* @param boolean $Value
*/
public function setValue($value){
$cleanValue = (boolean)$value;
        parent::setValue($cleanValue);
}

/**
* Returns this attributes value
*
* @return boolean
*/
public function getValue(){
return (boolean)parent::getValue();
}

}
Something went wrong with that request. Please try again.