Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Tree: c79ad79cb5
Fetching contributors…

Cannot retrieve contributors at this time

61 lines (53 sloc) 1.019 kB
<?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();
}
}
Jump to Line
Something went wrong with that request. Please try again.