EventType::getSpecialty PHP Method

getSpecialty() public method

Get the Specialty for this event type (as defined by the first camelcase section of the module name).
public getSpecialty ( ) : Specialty
return Specialty
    public function getSpecialty()
    {
        preg_match('/^([A-Z][a-z]+)([A-Z][a-z]+)([A-Z][a-z]+)$/', $this->class_name, $m);
        return Specialty::model()->find('code=?', array(strtoupper($m[1])));
    }