public static function framework($extras = false, $debug = null)
	{
		$type = $extras ? 'ui' : 'core';

		if (!empty(self::$loaded[__METHOD__][$type]))
		{
			return;
		}

		// If no debugging value is set, use the configuration setting
		if ($debug === null)
		{
			$debug = App::get('config')->get('debug');
		}

		if ($type != 'core' && empty(self::$loaded[__METHOD__]['core']))
		{
			self::framework(false, $debug);
		}

		// We need to make sure the framework is first, regardless of where/when
		// Behavior::framework() is called. For instance, if called in the template
		// then the framework needs to be pushed before any custom scripts the component
		// or plugins may have already pushed.
		$path = '/core/assets/js/jquery' . ($type == 'core' ? '' : '.ui') . '.js';
		if (file_exists(PATH_ROOT . $path))
		{
			$path .= '?v=' . filemtime(PATH_ROOT . $path);
		}
		$path = rtrim(App::get('request')->root(true), '/') . $path;

		if ($type == 'core')
		{
			self::_pushScriptTo(0, $path);

			if (App::isAdmin())
			{
				Asset::script('assets/core.js', false, true);
			}
		}
		else
		{
			self::_pushScriptTo(1, $path);
		}
		self::$loaded[__METHOD__][$type] = true;

		return;
	}
public static function framework($extras = false, $debug = null)
	{
		$type = $extras ? 'ui' : 'core';

		if (!empty(self::$loaded[__METHOD__][$type]))
		{
			return;
		}

		// If no debugging value is set, use the configuration setting
		if ($debug === null)
		{
			$debug = App::get('config')->get('debug');
		}

		if ($type != 'core' && empty(self::$loaded[__METHOD__]['core']))
		{
			self::framework(false, $debug);
		}

		// We need to make sure the framework is first, regardless of where/when
		// Behavior::framework() is called. For instance, if called in the template
		// then the framework needs to be pushed before any custom scripts the component
		// or plugins may have already pushed.
		$path = '/core/assets/js/jquery' . ($type == 'core' ? '' : '.ui') . '.js';
		if (file_exists(PATH_ROOT . $path))
		{
			$path .= '?v=' . filemtime(PATH_ROOT . $path);
		}
		$path = rtrim(App::get('request')->root(true), '/') . $path;

		if ($type == 'core')
		{
			self::_pushScriptTo(0, $path);

			if (App::isAdmin())
			{
				Asset::script('assets/core.js', false, true);
			}
		}
		else
		{
			self::_pushScriptTo(1, $path);
		}
		self::$loaded[__METHOD__][$type] = true;

		return;
	}
public static function framework ( $ extras = false , $ debug = null ) { $ type = $ extras ? 'ui' : 'core' ; if ( ! empty ( self :: $ loaded [ __METHOD__ ] [ $ type ] ) ) { return ; } // If no debugging value is set, use the configuration setting if ( $ debug === null ) { $ debug = App :: get ( 'config' ) -> get ( 'debug' ) ; } if ( $ type != 'core' && empty ( self :: $ loaded [ __METHOD__ ] [ 'core' ] ) ) { self :: framework ( false , $ debug ) ; } // We need to make sure the framework is first, regardless of where/when // Behavior::framework() is called. For instance, if called in the template // then the framework needs to be pushed before any custom scripts the component // or plugins may have already pushed. $ path = '/core/assets/js/jquery' . ( $ type == 'core' ? '' : '.ui' ) . '.js' ; if ( file_exists ( PATH_ROOT . $ path ) ) { $ path .= '?v=' . filemtime ( PATH_ROOT . $ path ) ; } $ path = rtrim ( App :: get ( 'request' ) -> root ( true ) , '/' ) . $ path ; if ( $ type == 'core' ) { self :: _pushScriptTo ( 0 , $ path ) ; if ( App :: isAdmin ( ) ) { Asset :: script ( 'assets/core.js' , false , true ) ; } } else { self :: _pushScriptTo ( 1 , $ path ) ; } self :: $ loaded [ __METHOD__ ] [ $ type ] = true ; return ; }
Method to load the MooTools framework into the document head

If debugging mode is on an uncompressed version of MooTools is included for easier debugging.

@param   string   $extras  MooTools file to load
@param   boolean  $debug   Is debugging mode on? [optional]
@return  void
Method to load the MooTools framework into the document head