wire($name); } /** * Get or set the current ProcessWire instance * * #pw-group-common * * @param ProcessWire|Wire|null $wire To set specify ProcessWire instance or any Wire-derived object in it, or omit to get current instance. * @return ProcessWire * @since 3.0.125 * */ function wireInstance(Wire $wire = null) { if($wire === null) return ProcessWire::getCurrentInstance(); if(!$wire instanceof ProcessWire) $wire = $wire->wire(); ProcessWire::setCurrentInstance($wire); return $wire; } /** * 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. * * #pw-internal * * @deprecated * @param string $name If omitted, returns a Fuel object with references to all the fuel. * @return mixed Fuel value if available, NULL if not. * */ function fuel($name = '') { return wire($name); } if(!function_exists("tabIndent")): /** * Indent the given string with $numTabs tab characters * * Newlines are assumed to be \n * * Watch out when using this function with strings that have a