Файловый менеджер - Редактировать - /var/www/html/mediawiki-1.43.1/includes/Rest/Validator/UnsupportedContentTypeBodyValidator.php
Ðазад
<?php namespace MediaWiki\Rest\Validator; use MediaWiki\Rest\LocalizedHttpException; use MediaWiki\Rest\RequestInterface; use Wikimedia\Message\MessageValue; /** * Validator that always fails. Meant as a convenience for Handler::getBodyValidator(): * * public function getBodyValidator( $contentType ) { * if ( $contentType === 'supported/content-type' ) { * return new MyValidator(); * } * return new UnsupportedContentTypeBodyValidator( $contentType ); * } * * @since 1.40 */ class UnsupportedContentTypeBodyValidator implements BodyValidator { /** @var string */ private string $contentType; /** * @param string $contentType */ public function __construct( string $contentType ) { $this->contentType = $contentType; } /** * @inheritDoc * @return never */ public function validateBody( RequestInterface $request ) { throw new LocalizedHttpException( new MessageValue( 'rest-unsupported-content-type', [ $this->contentType ] ), 415 ); } }
| ver. 1.1 | |
.
| PHP 8.4.18 | Ð“ÐµÐ½ÐµÑ€Ð°Ñ†Ð¸Ñ Ñтраницы: 0 |
proxy
|
phpinfo
|
ÐаÑтройка