protected function check($struct) { if (!is_string($struct) || !preg_match('/^[a-zA-Z0-9_]+$/', $struct)) { throw new RedException('Identifier does not conform to RedBeanPHP security policies.'); } return $struct; }