Set_Up_Automator::file_name_to_class( $file )


Parameters Parameters

$file

(Required)


Top ↑

Return Return

(string)


Source Source

File: src/core/classes/class-set-up-automator.php

	public static function file_name_to_class( $file ) {
		$name = array_map(
			'ucfirst',
			explode(
				'-',
				str_replace(
					array(
						'class-',
						'.php',
					),
					'',
					basename( $file )
				)
			)
		);

		return join( '_', $name );
	}