for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Subreality\Dilmun\Anshar\Http\UriParts;
/**
* Class UserInfo
* @package Subreality\Dilmun\Anshar\Http\UriParts
*/
class UserInfo extends AbstractUriPart
{
protected $unencoded_characters = array(":");
protected $compositions = array(
"unreserved_characters",
"sub_delims_characters",
);
* UserInfo constructor. Accepts a string representing a URI user info component. Construction will throw an
* exception if the user info is not a string.
*
* Construction accepts strings that have been percent-encoded as well as strings that have not been percent-encoded
* and will encode invalid characters.
* Construction with a string that includes both encoded and decoded characters will be assumed to be an encoded
* string, resulting in double-encoding.
* userinfo = *( unreserved / pct-encoded / sub-delims / ":" )
* unreserved = ALPHA / DIGIT / "-" / "." / "_" / "~"
* pct-encoded = "%" HEXDIG HEXDIG
* sub-delims = "!" / "$" / "&" / "'" / "(" / ")" / "*" / "+" / "," / ";" / "="
* @see https://tools.ietf.org/html/rfc3986#appendix-A
* @throws \InvalidArgumentException
* @param string $user_info A string representing a URI fragment
public function __construct($user_info)
parent::__construct($user_info, "User info");
}