Skip to content

Commit

Permalink
v3
Browse files Browse the repository at this point in the history
  • Loading branch information
fenric committed Oct 24, 2024
1 parent e146d46 commit 7c896fc
Show file tree
Hide file tree
Showing 74 changed files with 518 additions and 833 deletions.
30 changes: 0 additions & 30 deletions src/Annotation/Consumes/Image.php

This file was deleted.

30 changes: 0 additions & 30 deletions src/Annotation/Consumes/Json.php

This file was deleted.

30 changes: 0 additions & 30 deletions src/Annotation/Consumes/Xml.php

This file was deleted.

29 changes: 29 additions & 0 deletions src/Annotation/ConsumesImage.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<?php

/**
* It's free open-source software released under the MIT License.
*
* @author Anatoly Nekhay <[email protected]>
* @copyright Copyright (c) 2018, Anatoly Nekhay
* @license https://github.com/sunrise-php/http-router/blob/master/LICENSE
* @link https://github.com/sunrise-php/http-router
*/

declare(strict_types=1);

namespace Sunrise\Http\Router\Annotation;

use Attribute;
use Sunrise\Http\Router\Entity\MediaType\MediaTypeFactory;

/**
* @since 3.0.0
*/
#[Attribute(Attribute::TARGET_CLASS | Attribute::TARGET_METHOD | Attribute::IS_REPEATABLE)]
final class ConsumesImage extends Consumes
{
public function __construct()
{
parent::__construct(MediaTypeFactory::image());
}
}
29 changes: 29 additions & 0 deletions src/Annotation/ConsumesJson.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<?php

/**
* It's free open-source software released under the MIT License.
*
* @author Anatoly Nekhay <[email protected]>
* @copyright Copyright (c) 2018, Anatoly Nekhay
* @license https://github.com/sunrise-php/http-router/blob/master/LICENSE
* @link https://github.com/sunrise-php/http-router
*/

declare(strict_types=1);

namespace Sunrise\Http\Router\Annotation;

use Attribute;
use Sunrise\Http\Router\Entity\MediaType\MediaTypeFactory;

/**
* @since 3.0.0
*/
#[Attribute(Attribute::TARGET_CLASS | Attribute::TARGET_METHOD | Attribute::IS_REPEATABLE)]
final class ConsumesJson extends Consumes
{
public function __construct()
{
parent::__construct(MediaTypeFactory::json());
}
}
29 changes: 29 additions & 0 deletions src/Annotation/ConsumesXml.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<?php

/**
* It's free open-source software released under the MIT License.
*
* @author Anatoly Nekhay <[email protected]>
* @copyright Copyright (c) 2018, Anatoly Nekhay
* @license https://github.com/sunrise-php/http-router/blob/master/LICENSE
* @link https://github.com/sunrise-php/http-router
*/

declare(strict_types=1);

namespace Sunrise\Http\Router\Annotation;

use Attribute;
use Sunrise\Http\Router\Entity\MediaType\MediaTypeFactory;

/**
* @since 3.0.0
*/
#[Attribute(Attribute::TARGET_CLASS | Attribute::TARGET_METHOD | Attribute::IS_REPEATABLE)]
final class ConsumesXml extends Consumes
{
public function __construct()
{
parent::__construct(MediaTypeFactory::xml());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,16 @@

declare(strict_types=1);

namespace Sunrise\Http\Router\Annotation\Method;
namespace Sunrise\Http\Router\Annotation;

use Attribute;
use Fig\Http\Message\RequestMethodInterface;
use Sunrise\Http\Router\Annotation\Method;

/**
* @since 3.0.0
*/
#[Attribute(Attribute::TARGET_CLASS | Attribute::TARGET_METHOD | Attribute::IS_REPEATABLE)]
final class Delete extends Method
final class MethodDelete extends Method
{
public function __construct()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,16 @@

declare(strict_types=1);

namespace Sunrise\Http\Router\Annotation\Method;
namespace Sunrise\Http\Router\Annotation;

use Attribute;
use Fig\Http\Message\RequestMethodInterface;
use Sunrise\Http\Router\Annotation\Method;

/**
* @since 3.0.0
*/
#[Attribute(Attribute::TARGET_CLASS | Attribute::TARGET_METHOD | Attribute::IS_REPEATABLE)]
final class Get extends Method
final class MethodGet extends Method
{
public function __construct()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,16 @@

declare(strict_types=1);

namespace Sunrise\Http\Router\Annotation\Method;
namespace Sunrise\Http\Router\Annotation;

use Attribute;
use Fig\Http\Message\RequestMethodInterface;
use Sunrise\Http\Router\Annotation\Method;

/**
* @since 3.0.0
*/
#[Attribute(Attribute::TARGET_CLASS | Attribute::TARGET_METHOD | Attribute::IS_REPEATABLE)]
final class Head extends Method
final class MethodHead extends Method
{
public function __construct()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,16 @@

declare(strict_types=1);

namespace Sunrise\Http\Router\Annotation\Method;
namespace Sunrise\Http\Router\Annotation;

use Attribute;
use Fig\Http\Message\RequestMethodInterface;
use Sunrise\Http\Router\Annotation\Method;

/**
* @since 3.0.0
*/
#[Attribute(Attribute::TARGET_CLASS | Attribute::TARGET_METHOD | Attribute::IS_REPEATABLE)]
final class Options extends Method
final class MethodOptions extends Method
{
public function __construct()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,16 @@

declare(strict_types=1);

namespace Sunrise\Http\Router\Annotation\Method;
namespace Sunrise\Http\Router\Annotation;

use Attribute;
use Fig\Http\Message\RequestMethodInterface;
use Sunrise\Http\Router\Annotation\Method;

/**
* @since 3.0.0
*/
#[Attribute(Attribute::TARGET_CLASS | Attribute::TARGET_METHOD | Attribute::IS_REPEATABLE)]
final class Patch extends Method
final class MethodPatch extends Method
{
public function __construct()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,16 @@

declare(strict_types=1);

namespace Sunrise\Http\Router\Annotation\Method;
namespace Sunrise\Http\Router\Annotation;

use Attribute;
use Fig\Http\Message\RequestMethodInterface;
use Sunrise\Http\Router\Annotation\Method;

/**
* @since 3.0.0
*/
#[Attribute(Attribute::TARGET_CLASS | Attribute::TARGET_METHOD | Attribute::IS_REPEATABLE)]
final class Post extends Method
final class MethodPost extends Method
{
public function __construct()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,16 @@

declare(strict_types=1);

namespace Sunrise\Http\Router\Annotation\Method;
namespace Sunrise\Http\Router\Annotation;

use Attribute;
use Fig\Http\Message\RequestMethodInterface;
use Sunrise\Http\Router\Annotation\Method;

/**
* @since 3.0.0
*/
#[Attribute(Attribute::TARGET_CLASS | Attribute::TARGET_METHOD | Attribute::IS_REPEATABLE)]
final class Purge extends Method
final class MethodPurge extends Method
{
public function __construct()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,16 @@

declare(strict_types=1);

namespace Sunrise\Http\Router\Annotation\Method;
namespace Sunrise\Http\Router\Annotation;

use Attribute;
use Fig\Http\Message\RequestMethodInterface;
use Sunrise\Http\Router\Annotation\Method;

/**
* @since 3.0.0
*/
#[Attribute(Attribute::TARGET_CLASS | Attribute::TARGET_METHOD | Attribute::IS_REPEATABLE)]
final class Put extends Method
final class MethodPut extends Method
{
public function __construct()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,16 @@

declare(strict_types=1);

namespace Sunrise\Http\Router\Annotation\Pattern;
namespace Sunrise\Http\Router\Annotation;

use Attribute;
use Sunrise\Http\Router\Annotation\Pattern;
use Sunrise\Http\Router\Dictionary\VariablePattern;

/**
* @since 3.0.0
*/
#[Attribute(Attribute::TARGET_CLASS | Attribute::TARGET_METHOD | Attribute::IS_REPEATABLE)]
final class Uuid extends Pattern
final class PatternUuid extends Pattern
{
public function __construct(string $variableName)
{
Expand Down
30 changes: 0 additions & 30 deletions src/Annotation/Produces/Html.php

This file was deleted.

Loading

0 comments on commit 7c896fc

Please sign in to comment.