/** * Get a component or return the xu instance. * * @param string $component * @param mixed $arguments * * @return \Xu\Foundation\Foundation */ function xu($component = '', $arguments = []) { if (is_string($component) && !empty($component)) { return Foundation::get_instance()->component($component, $arguments); } return Foundation::get_instance(); }
/** * Call xu functions as a static method. * * @param string $method * @param array $args * * @return mixed */ public static function __callStatic($method, $args) { return Foundation::get_instance()->fn($method, $args); }