first commit
This commit is contained in:
21
libraries/vendor/psr/link/LICENSE.md
vendored
Normal file
21
libraries/vendor/psr/link/LICENSE.md
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
# The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2016 PHP Framework Interoperability Group
|
||||
|
||||
> Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
> of this software and associated documentation files (the "Software"), to deal
|
||||
> in the Software without restriction, including without limitation the rights
|
||||
> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
> copies of the Software, and to permit persons to whom the Software is
|
||||
> furnished to do so, subject to the following conditions:
|
||||
>
|
||||
> The above copyright notice and this permission notice shall be included in
|
||||
> all copies or substantial portions of the Software.
|
||||
>
|
||||
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
> THE SOFTWARE.
|
||||
79
libraries/vendor/psr/link/src/EvolvableLinkInterface.php
vendored
Normal file
79
libraries/vendor/psr/link/src/EvolvableLinkInterface.php
vendored
Normal file
@ -0,0 +1,79 @@
|
||||
<?php
|
||||
|
||||
namespace Psr\Link;
|
||||
|
||||
/**
|
||||
* An evolvable link value object.
|
||||
*/
|
||||
interface EvolvableLinkInterface extends LinkInterface
|
||||
{
|
||||
/**
|
||||
* Returns an instance with the specified href.
|
||||
*
|
||||
* @param string|\Stringable $href
|
||||
* The href value to include. It must be one of:
|
||||
* - An absolute URI, as defined by RFC 5988.
|
||||
* - A relative URI, as defined by RFC 5988. The base of the relative link
|
||||
* is assumed to be known based on context by the client.
|
||||
* - A URI template as defined by RFC 6570.
|
||||
* - An object implementing __toString() that produces one of the above
|
||||
* values.
|
||||
*
|
||||
* An implementing library SHOULD evaluate a passed object to a string
|
||||
* immediately rather than waiting for it to be returned later.
|
||||
*
|
||||
* @return static
|
||||
*/
|
||||
public function withHref(string|\Stringable $href);
|
||||
|
||||
/**
|
||||
* Returns an instance with the specified relationship included.
|
||||
*
|
||||
* If the specified rel is already present, this method MUST return
|
||||
* normally without errors, but without adding the rel a second time.
|
||||
*
|
||||
* @param string $rel
|
||||
* The relationship value to add.
|
||||
* @return static
|
||||
*/
|
||||
public function withRel(string $rel);
|
||||
|
||||
/**
|
||||
* Returns an instance with the specified relationship excluded.
|
||||
*
|
||||
* If the specified rel is already not present, this method MUST return
|
||||
* normally without errors.
|
||||
*
|
||||
* @param string $rel
|
||||
* The relationship value to exclude.
|
||||
* @return static
|
||||
*/
|
||||
public function withoutRel(string $rel);
|
||||
|
||||
/**
|
||||
* Returns an instance with the specified attribute added.
|
||||
*
|
||||
* If the specified attribute is already present, it will be overwritten
|
||||
* with the new value.
|
||||
*
|
||||
* @param string $attribute
|
||||
* The attribute to include.
|
||||
* @param string|\Stringable|int|float|bool|array $value
|
||||
* The value of the attribute to set.
|
||||
* @return static
|
||||
*/
|
||||
public function withAttribute(string $attribute, string|\Stringable|int|float|bool|array $value);
|
||||
|
||||
|
||||
/**
|
||||
* Returns an instance with the specified attribute excluded.
|
||||
*
|
||||
* If the specified attribute is not present, this method MUST return
|
||||
* normally without errors.
|
||||
*
|
||||
* @param string $attribute
|
||||
* The attribute to remove.
|
||||
* @return static
|
||||
*/
|
||||
public function withoutAttribute(string $attribute);
|
||||
}
|
||||
35
libraries/vendor/psr/link/src/EvolvableLinkProviderInterface.php
vendored
Normal file
35
libraries/vendor/psr/link/src/EvolvableLinkProviderInterface.php
vendored
Normal file
@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
namespace Psr\Link;
|
||||
|
||||
/**
|
||||
* An evolvable link provider value object.
|
||||
*/
|
||||
interface EvolvableLinkProviderInterface extends LinkProviderInterface
|
||||
{
|
||||
/**
|
||||
* Returns an instance with the specified link included.
|
||||
*
|
||||
* If the specified link is already present, this method MUST return normally
|
||||
* without errors. The link is present if $link is === identical to a link
|
||||
* object already in the collection.
|
||||
*
|
||||
* @param LinkInterface $link
|
||||
* A link object that should be included in this collection.
|
||||
* @return static
|
||||
*/
|
||||
public function withLink(LinkInterface $link);
|
||||
|
||||
/**
|
||||
* Returns an instance with the specifed link removed.
|
||||
*
|
||||
* If the specified link is not present, this method MUST return normally
|
||||
* without errors. The link is present if $link is === identical to a link
|
||||
* object already in the collection.
|
||||
*
|
||||
* @param LinkInterface $link
|
||||
* The link to remove.
|
||||
* @return static
|
||||
*/
|
||||
public function withoutLink(LinkInterface $link);
|
||||
}
|
||||
52
libraries/vendor/psr/link/src/LinkInterface.php
vendored
Normal file
52
libraries/vendor/psr/link/src/LinkInterface.php
vendored
Normal file
@ -0,0 +1,52 @@
|
||||
<?php
|
||||
|
||||
namespace Psr\Link;
|
||||
|
||||
/**
|
||||
* A readable link object.
|
||||
*/
|
||||
interface LinkInterface
|
||||
{
|
||||
/**
|
||||
* Returns the target of the link.
|
||||
*
|
||||
* The target link must be one of:
|
||||
* - An absolute URI, as defined by RFC 5988.
|
||||
* - A relative URI, as defined by RFC 5988. The base of the relative link
|
||||
* is assumed to be known based on context by the client.
|
||||
* - A URI template as defined by RFC 6570.
|
||||
*
|
||||
* If a URI template is returned, isTemplated() MUST return True.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getHref();
|
||||
|
||||
/**
|
||||
* Returns whether or not this is a templated link.
|
||||
*
|
||||
* @return bool
|
||||
* True if this link object is templated, False otherwise.
|
||||
*/
|
||||
public function isTemplated();
|
||||
|
||||
/**
|
||||
* Returns the relationship type(s) of the link.
|
||||
*
|
||||
* This method returns 0 or more relationship types for a link, expressed
|
||||
* as an array of strings.
|
||||
*
|
||||
* @return string[]
|
||||
*/
|
||||
public function getRels();
|
||||
|
||||
/**
|
||||
* Returns a list of attributes that describe the target URI.
|
||||
*
|
||||
* @return array
|
||||
* A key-value list of attributes, where the key is a string and the value
|
||||
* is either a PHP primitive or an array of PHP strings. If no values are
|
||||
* found an empty array MUST be returned.
|
||||
*/
|
||||
public function getAttributes();
|
||||
}
|
||||
32
libraries/vendor/psr/link/src/LinkProviderInterface.php
vendored
Normal file
32
libraries/vendor/psr/link/src/LinkProviderInterface.php
vendored
Normal file
@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
namespace Psr\Link;
|
||||
|
||||
/**
|
||||
* A link provider object.
|
||||
*/
|
||||
interface LinkProviderInterface
|
||||
{
|
||||
/**
|
||||
* Returns an iterable of LinkInterface objects.
|
||||
*
|
||||
* The iterable may be an array or any PHP \Traversable object. If no links
|
||||
* are available, an empty array or \Traversable MUST be returned.
|
||||
*
|
||||
* @return LinkInterface[]|\Traversable
|
||||
*/
|
||||
public function getLinks();
|
||||
|
||||
/**
|
||||
* Returns an iterable of LinkInterface objects that have a specific relationship.
|
||||
*
|
||||
* The iterable may be an array or any PHP \Traversable object. If no links
|
||||
* with that relationship are available, an empty array or \Traversable MUST be returned.
|
||||
*
|
||||
* @param string $rel
|
||||
* The relationship name for which to retrieve links.
|
||||
*
|
||||
* @return LinkInterface[]|\Traversable
|
||||
*/
|
||||
public function getLinksByRel(string $rel);
|
||||
}
|
||||
Reference in New Issue
Block a user