private function underscore($name)
    {
        if (!isset($this->underscoreCache[$name])) {
            $this->underscoreCache[$name] = strtolower(preg_replace('/(.)([A-Z])/', "$1_$2", $name));
        }

        return $this->underscoreCache[$name];
    }
private function underscore($name)
    {
        if (!isset($this->underscoreCache[$name])) {
            $this->underscoreCache[$name] = strtolower(preg_replace('/(.)([A-Z])/', "$1_$2", $name));
        }

        return $this->underscoreCache[$name];
    }
private function underscore ( $ name ) { if ( ! isset ( $ this -> underscoreCache [ $ name ] ) ) { $ this -> underscoreCache [ $ name ] = strtolower ( preg_replace ( '/(.)([A-Z])/' , "$1_$2" , $ name ) ) ; } return $ this -> underscoreCache [ $ name ] ; }
Converts tag name from camelCase to snake_case

isSearchable === is_searchable
Uses cache to eliminate unnecessary preg_replace

@param string $name The name to transform

@return string
Converts tag name from camelCase to snake_case