Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

26 lines (22 sloc) 0.509 kB
<?php
namespace Pv;
class PBoolean extends Variable
{
public function __construct($value,$type=null)
{
if (!is_bool($value)) {
throw new ValidationException('Variable type mismatch, expected boolean');
}
parent::__construct($value,$type);
}
/**
* Convert the value to a string
*
* @return string String value of the boolean
*/
public function toString()
{
return ($this->value == true) ? 'true' : 'false';
}
}
?>
Jump to Line
Something went wrong with that request. Please try again.