protected function _getTypeSizeScope($spec)
{
$spec = strtolower($spec);
$type = null;
$size = null;
$scope = null;
// find the parens, if any
$pos = strpos($spec, '(');
if ($pos === false) {
// no parens, so no size or scope
$type = $spec;
} else {
// find the type first.
$type = substr($spec, 0, $pos);
// there were parens, so there's at least a size.
// remove parens to get the size.
$size = trim(substr($spec, $pos), '()');
// a comma in the size indicates a scope.
$pos = strpos($size, ',');
if ($pos !== false) {
$scope = substr($size, $pos + 1);
$size = substr($size, 0, $pos);
}
}
foreach ($this->_native_solar as $native => $solar) {
// $type is already lowered
if ($type == strtolower($native)) {
$type = strtolower($solar);
break;
}
}
return array($type, $size, $scope);
}