Example #1
0
 /**
  * Get ctype name
  * extract constant CTYPE to ctype_id
  */
 function _get_ctype()
 {
     if (!isset($this->_ctype)) {
         if (loader::is_php53()) {
             $this->_ctype = defined('static::CTYPE') ? static::CTYPE : false;
         } else {
             // php 5.2, no lsb
             $class = get_class($this);
             $reflector = new ReflectionClass($class);
             $this->_ctype = $reflector->hasConstant('CTYPE') ? $reflector->getConstant('CTYPE') : false;
         }
     }
     return $this->_ctype;
 }