App.php
protected static function _loadModulesConfig( )
		{
			$config = array( '..' , '.' );
			foreach ( static::options( ) as $key => $val )
			{
				$config[ ] = $key . '.php';
			}
			foreach ( Module::all( ) as $k => $module )
			{
				$scanned_directory = array_diff( scandir( ptc_path( 'root' ) . '/modules/' . $k . '/config' ) , $config );
				if ( !empty( $scanned_directory ) )
				{
					foreach ( $scanned_directory as $file )
					{
						$option_name = str_replace( '.php' , '' , $file );
						$options = require( ptc_path( 'root' ) . '/modules/' . $k . '/config/' . $file );
						if ( ptc_array_get( $options , '_load' ) )
						{
							$options = call_user_func( ptc_array_get( $options , '_load' ) , $options );
						}
						static::option( $option_name , $options );
					}
				}
			}
		}
protected static function _loadModulesConfig( )
		{
			$config = array( '..' , '.' );
			foreach ( static::options( ) as $key => $val )
			{
				$config[ ] = $key . '.php';
			}
			foreach ( Module::all( ) as $k => $module )
			{
				$scanned_directory = array_diff( scandir( ptc_path( 'root' ) . '/modules/' . $k . '/config' ) , $config );
				if ( !empty( $scanned_directory ) )
				{
					foreach ( $scanned_directory as $file )
					{
						$option_name = str_replace( '.php' , '' , $file );
						$options = require( ptc_path( 'root' ) . '/modules/' . $k . '/config/' . $file );
						if ( ptc_array_get( $options , '_load' ) )
						{
							$options = call_user_func( ptc_array_get( $options , '_load' ) , $options );
						}
						static::option( $option_name , $options );
					}
				}
			}
		}
protected static function _loadModulesConfig ( ) { $ config = array ( '..' , '.' ) ; foreach ( static :: options ( ) as $ key => $ val ) { $ config [ ] = $ key . '.php' ; } foreach ( Module :: all ( ) as $ k => $ module ) { $ scanned_directory = array_diff ( scandir ( ptc_path ( 'root' ) . '/modules/' . $ k . '/config' ) , $ config ) ; if ( ! empty ( $ scanned_directory ) ) { foreach ( $ scanned_directory as $ file ) { $ option_name = str_replace ( '.php' , '' , $ file ) ; $ options = require ( ptc_path ( 'root' ) . '/modules/' . $ k . '/config/' . $ file ) ; if ( ptc_array_get ( $ options , '_load' ) ) { $ options = call_user_func ( ptc_array_get ( $ options , '_load' ) , $ options ) ; } static :: option ( $ option_name , $ options ) ; } } } }
Load module config files that are not in root config
Load module config files that are not in root config