Mecha CMS

Helper functions.

c2f

Convert class name to file name.

2.2.0

Example:

echo c2f('Foo');
echo c2f('\Foo');
echo c2f('_Foo');
echo c2f('FooBar');
echo c2f('Foo_Bar');
echo c2f('Foo\Bar');
echo c2f('Foo\_Bar');
echo c2f('Foo_\Bar');

Result:

foo
.foo
_foo
foo-bar
foo_bar
foo.bar
foo._bar
foo_.bar