src/MVC/MVCTrait.php
protected function helper($classname) {

		$directories 	= explode('.', $classname); //Convert dots to directory seperators
		$amount 		= count($directories) - 1;
		$namespace 		= Router :: getRoute() -> getModule() . '\\' . str_replace(DIRECTORY_SEPARATOR, '\\', Application :: get(['directory', 'helper']));

		foreach($directories as $index => $directory) {

			if($amount === $index) {
				
				$namespace .= Application :: get(['prefix', 'helper']) . $directory;
				break;
			}

			$namespace 	.= $directory . '\\';
		}

		return new $namespace;
	}
protected function helper($classname) {

		$directories 	= explode('.', $classname); //Convert dots to directory seperators
		$amount 		= count($directories) - 1;
		$namespace 		= Router :: getRoute() -> getModule() . '\\' . str_replace(DIRECTORY_SEPARATOR, '\\', Application :: get(['directory', 'helper']));

		foreach($directories as $index => $directory) {

			if($amount === $index) {
				
				$namespace .= Application :: get(['prefix', 'helper']) . $directory;
				break;
			}

			$namespace 	.= $directory . '\\';
		}

		return new $namespace;
	}
protected function helper ( $ classname ) { $ directories = explode ( '.' , $ classname ) ; //Convert dots to directory seperators
 $ amount = count ( $ directories ) - 1 ; $ namespace = Router :: getRoute ( ) -> getModule ( ) . '\\' . str_replace ( DIRECTORY_SEPARATOR , '\\' , Application :: get ( [ 'directory' , 'helper' ] ) ) ; foreach ( $ directories as $ index => $ directory ) { if ( $ amount === $ index ) { $ namespace .= Application :: get ( [ 'prefix' , 'helper' ] ) . $ directory ; break ; } $ namespace .= $ directory . '\\' ; } return new $ namespace ; }
Loads a helper class in current module directory
@param string $classname
@return Object
Loads a helper class in current module directory