Wire::getAllFuel PHP Method

getAllFuel() public static method

Returns an iterable Fuel object of all Fuel currently loaded
Deprecation: This method will be going away. Use $this->wire() instead, or if static required use: Wire::getFuel() with no arguments
public static getAllFuel ( ) : Fuel
return Fuel
    public static function getAllFuel()
    {
        return self::$fuel;
    }

Usage Example

/**
 * Return all Fuel, or specified ProcessWire API variable, or NULL if it doesn't exist.
 *
 * Same as Wire::getFuel($name) and Wire::getAllFuel();
 * When a $name is specified, this function is identical to the wire() function.
 * Both functions exist more for consistent naming depending on usage. 
 *
 * @param string $name If ommitted, returns a Fuel object with references to all the fuel.
 * @return mixed Fuel value if available, NULL if not. 
 *
 */
function fuel($name = '')
{
    if (!$name) {
        return Wire::getAllFuel();
    }
    return Wire::getFuel($name);
}
All Usage Examples Of Wire::getAllFuel