Mecha CMS

Helper functions.

c2f

Convert class name to file name.

2.2.0

c2f(string $value, $accent = false);

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__Baz');
echo c2f('Foo\_Bar');
echo c2f('Foo_\Bar');

Result:

foo
/foo
_-foo
foo-bar
foo_-bar
foo/bar
foo/bar.baz
foo/_-bar
foo_/bar