Brand parent API URL arg.

@since 160629 Brand URL args.

@param string $arg Arg to create.

@return string URL arg.
1349
public function brandParentApiArg(string $arg = ''): string
    {
        return $this->App->Parent ? $this->App->Parent->Utils->§BrandUrl->brandApiArg($arg) : $this->brandApiArg($arg);
    }
1311239
public static function parseFontAwesomeIcon(array $args) {

        $icon = static::newFontAwesomeIcon();

        $icon->setName(ArrayHelper::get($args, "name", "home"));
        $icon->setStyle(ArrayHelper::get($args, "style"));

        $icon->setAnimation(ArrayHelper::get($args, "animation"));
        $icon->setBordered(ArrayHelper::get($args, "bordered", false));
        $icon->setFixedWidth(ArrayHelper::get($args, "fixedWidth", false));
        $icon->setFont(ArrayHelper::get($args, "font"));
        $icon->setPull(ArrayHelper::get($args, "pull"));
        $icon->setSize(ArrayHelper::get($args, "size"));

        return $icon;
    }
822190
public static function parseMaterialDesignIconicFontIcon(array $args) {

        $icon = static::newMaterialDesignIconicFontIcon();

        $icon->setName(ArrayHelper::get($args, "name", "home"));
        $icon->setStyle(ArrayHelper::get($args, "style"));

        $icon->setBorder(ArrayHelper::get($args, "border", false));
        $icon->setFixedWidth(ArrayHelper::get($args, "fixedWidth", false));
        $icon->setFlip(ArrayHelper::get($args, "flip"));
        $icon->setPull(ArrayHelper::get($args, "pull"));
        $icon->setRotate(ArrayHelper::get($args, "rotate"));
        $icon->setSize(ArrayHelper::get($args, "size"));
        $icon->setSpin(ArrayHelper::get($args, "spin"));

        return $icon;
    }
199494
public function brandCoreApiArg(string $arg = ''): string
    {
        if ($this->App->Parent) { // Looking for the root core.
            return $this->App->Parent->Utils->§BrandUrl->brandCoreApiArg($arg);
        }
        return $this->brandApiArg($arg);
    }
847136
public function get_current_url( $args = [] ) {
		$url = $this->get_current_host() . $this->get_current_path();
		if ( ! empty( $args ) ) {
			$url = add_query_arg( $args, $url );
		}

		return $url;
	}
1103744
public function toBrandParent(string $uri = '', string $variation = null): string
    {
        return $this->App->Parent ? $this->App->Parent->Utils->§BrandUrl->toBrand($uri, $variation) : $this->toBrand($uri, $variation);
    }
391556
public function brandCoreStatsArg(string $arg = ''): string
    {
        if ($this->App->Parent) { // Looking for the root core.
            return $this->App->Parent->Utils->§BrandUrl->brandCoreStatsArg($arg);
        }
        return $this->brandStatsArg($arg);
    }
688572
public static function argValue(ArgumentNode $arg, $default = null)
    {
        $valueNode = $arg->value;

        if (! $valueNode) {
            return $default;
        }

        return AST::valueFromASTUntyped($valueNode);
    }
1229178
public function filterAvatar( $url, $id_or_email, $args ) {
		if ( ! empty( $args['force_default'] ) ) {
			return $url;
		}

		if ( $this->default_avatar_id === 0 && empty( $this->avatar_user_meta_keys ) ) {
			return $url;
		}

		$id = $this->idOrEmailToId( $id_or_email );

		if ( is_numeric( $id ) ) {
			$filtered_url = $this->getAvatarUrl( (int) $id, $this->getSize( $args ) );
			if ( $filtered_url !== null ) {
				$url = $filtered_url;
			}
		}

		return $url;
	}
307858
public static function instance( $args = array() ) {
		if ( is_null( self::$instance ) ) {
			self::$instance = new self( $args );
		}

		return self::$instance;
	}
1354126
public function bootstrapButtonLinkFunction(array $args = []) {
        return $this->bootstrapButton(ButtonFactory::parseLinkButton($args), ArrayHelper::get($args, "icon"));
    }
186085
public function absoluteUrl($uri = null, $args = null)
    {
        if (isset($uri)) {
            $uri = '/'. ltrim($uri, "/");
            return $this->baseUrl() . $this->url->get($uri, $args);
        } else {
            return $this->baseUrl() . $this->url->getBaseUri();
        }
    }
398713
public function setArgument(Argument $arg)
    {
        if ($this->mode == Getopt::NO_ARGUMENT) {
            throw new \InvalidArgumentException("Option should not have any argument");
        }
        $this->argument = $arg;
        return $this;
    }
530855
public function where(...$args): AliasDecorator
    {
        if ($args[0] instanceof \Closure) {
            call_user_func($args[0], $this);

            return $this;
        }

        //We have to prepare only first argument
        $args[0] = $this->prepare($args[0]);

        //Routing where
        call_user_func_array([$this->query, $this->target], $args);

        return $this;
    }
842089
public function get( array $args = [], array $assoc_args = [] ) {

		$site_id = (int) $args[ 0 ];
		$site    = get_blog_details( $site_id );
		if ( ! $site ) {
			WP_CLI::error( "A site with ID {$site_id} does not exist" );
		}

		// trailing-slash it, as URLs ends always with a trailing slash in context of the wp_blogs table
		WP_CLI::line( trailingslashit( $site->siteurl ) );
		exit( 0 );
	}
573749
private static function guess_url( $assoc_args ) {
		if ( isset( $assoc_args['blog'] ) ) {
			$assoc_args['url'] = $assoc_args['blog'];
		}

		if ( isset( $assoc_args['url'] ) ) {
			$url = $assoc_args['url'];
			if ( true === $url ) {
				WP_CLI::warning( 'The --url parameter expects a value.' );
			}
		}

		if ( isset( $url ) ) {
			return $url;
		}

		return false;
	}
1061459
public function path($path, $args = [])
    {
        if (is_array($path)) {
            $path = array_merge($path, $args);
        } elseif ($args !== []) {
            $path = array_merge([$path], $args);
        }

        return Url::to($path);
    }