Internal loader function availability

One of the loader's internal methods has been renamed and made
available. This allows components to be loaded from e.g. arrays
directly.
This commit is contained in:
Emmanuel BENOîT 2012-02-05 17:49:54 +01:00
parent 29a026e71a
commit dd87433f82

View file

@ -409,7 +409,7 @@ final class Loader
return $cName; return $cName;
} }
private static function creator( $type , $convert , $args ) public static function DirectCreate( $type , $convert , $args )
{ {
$name = array_shift( $args ); $name = array_shift( $args );
$cName = $convert ? Loader::convertName( $type , $name ) : $name; $cName = $convert ? Loader::convertName( $type , $name ) : $name;
@ -466,22 +466,22 @@ final class Loader
public static function Create( ) public static function Create( )
{ {
return Loader::creator( 'extra' , false , func_get_args( ) ); return Loader::DirectCreate( 'extra' , false , func_get_args( ) );
} }
public static function View( ) public static function View( )
{ {
return Loader::creator( 'view' , true , func_get_args( ) ); return Loader::DirectCreate( 'view' , true , func_get_args( ) );
} }
public static function Ctrl( ) public static function Ctrl( )
{ {
return Loader::creator( 'ctrl' , true , func_get_args( ) ); return Loader::DirectCreate( 'ctrl' , true , func_get_args( ) );
} }
public static function Page( ) public static function Page( )
{ {
return Loader::creator( 'page' , true , func_get_args( ) ); return Loader::DirectCreate( 'page' , true , func_get_args( ) );
} }
public static function DAO( $name ) public static function DAO( $name )