0byt3m1n1-V2
Path:
/
home
/
academiac
/
www
/
plugins
/
vmcalculation
/
avalara
/
classes
/
[
Home
]
File: Enum.class.php
<?php if (!defined('_JEXEC')) die('Direct Access to ' . basename(__FILE__) . ' is not allowed.'); /** * Enum.class.php */ /** * Abstract class for enumerated types - provides validation. * * @author Avalara * @copyright � 2004 - 2011 Avalara, Inc. All rights reserved. * @package Base */ class Enum { // Basic implementation - check and throw protected static function __Validate($value,$values,$class=__CLASS__) { foreach($values as $valid) { if($value == $valid) { return true; } } throw new Exception('Invalid '.$class.' "'.$value.'" - must be one of "'.implode('"|"',$values).'"'); } } ?>
©
2018.