protected function isAllowType($type) { $constName = __CLASS__ . '::' . strtoupper($type) . '_TYPE'; return defined($constName); }