protected function _checkIdentifierPart($type, $name, $part)
{
// validate identifier length
$len = strlen($part);
if ($len < 1 || $len > $this->_maxlen) {
throw $this->_exception('ERR_IDENTIFIER_LENGTH', array('type' => $type, 'name' => $name, 'part' => $part, 'min' => 1, 'max' => $this->_maxlen, 'len' => $len));
}
// only a-z, 0-9, and _ are allowed in words.
// must start with a letter, not a number or underscore.
$regex = '/^[a-z][a-z0-9_]*$/';
if (!preg_match($regex, $name)) {
throw $this->_exception('ERR_IDENTIFIER_CHARS', array('type' => $type, 'name' => $name, 'part' => $part, 'regex' => $regex));
}
}