Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

26 lines (21 sloc) 0.501 kb
<?php
namespace Pv;
class PNumber extends Variable
{
public function __construct($value,$type=null)
{
if (!is_numeric($value)) {
throw new ValidationException('Could not create numeric object, bad input');
}
parent::__construct($value,$type);
}
/**
* Convert the value to a string
*
* @return string String value of the boolean
*/
public function toString()
{
return settype($this->value, 'string');
}
}
Jump to Line
Something went wrong with that request. Please try again.