Bolt\Storage\CaseTransformTrait::underscore PHP Method

underscore() public method

Converts a string from camel case to underscored.
public underscore ( string $id ) : string
$id string The string to underscore
return string The underscored string
    public function underscore($id)
    {
        return strtolower(preg_replace(['/([A-Z]+)([A-Z][a-z])/', '/([a-z\\d])([A-Z])/'], ['\\1_\\2', '\\1_\\2'], $id));
    }
CaseTransformTrait