|
MediaWiki master
|
Constraints reflect possible errors that need to be checked. More...
Public Member Functions | |
| __construct (private readonly ServiceOptions $options, private readonly HookContainer $hookContainer, private readonly ReadOnlyMode $readOnlyMode, private readonly SpamChecker $spamRegexChecker, private readonly LoggerInterface $spamRegexLogger, private readonly RateLimiter $rateLimiter, private readonly RedirectLookup $redirectLookup, private readonly IConnectionProvider $connectionProvider, private readonly LogFormatterFactory $logFormatterFactory, private readonly UserFactory $userFactory,) | |
| Some constraints have dependencies that need to be injected, this class serves as a factory for all of the different constraints that need dependencies injected. | |
| newAccidentalRecreationConstraint (Title $title, bool $allowRecreation, ?string $startTime, ?MessageSpecifier $submitButtonLabel=null,) | |
| newEditFilterMergedContentHookConstraint (Content $content, IContextSource $context, string $summary, bool $minorEdit, UserIdentity $user) | |
| newLinkPurgeRateLimitConstraint (RateLimitSubject $subject) | |
| newPageSizeConstraint (int $contentSize, string $type) | |
| newReadOnlyConstraint () | |
| newRedirectConstraint (?LinkTarget $allowedProblematicRedirectTarget, Content $newContent, ?Content $originalContent, PageReference $page, MessageSpecifier $errorMessageWrapper, ?string $contentFormat,) | |
| newSpamRegexConstraint (string $summary, ?string $sectionHeading, string $text, string $reqIP, PageReference $page,) | |
Public Attributes | |
| const | CONSTRUCTOR_OPTIONS |
Constraints reflect possible errors that need to be checked.
Definition at line 36 of file EditConstraintFactory.php.
| MediaWiki\EditPage\Constraint\EditConstraintFactory::__construct | ( | private readonly ServiceOptions | $options, |
| private readonly HookContainer | $hookContainer, | ||
| private readonly ReadOnlyMode | $readOnlyMode, | ||
| private readonly SpamChecker | $spamRegexChecker, | ||
| private readonly LoggerInterface | $spamRegexLogger, | ||
| private readonly RateLimiter | $rateLimiter, | ||
| private readonly RedirectLookup | $redirectLookup, | ||
| private readonly IConnectionProvider | $connectionProvider, | ||
| private readonly LogFormatterFactory | $logFormatterFactory, | ||
| private readonly UserFactory | $userFactory ) |
Some constraints have dependencies that need to be injected, this class serves as a factory for all of the different constraints that need dependencies injected.
Definition at line 49 of file EditConstraintFactory.php.
| MediaWiki\EditPage\Constraint\EditConstraintFactory::newAccidentalRecreationConstraint | ( | Title | $title, |
| bool | $allowRecreation, | ||
| ?string | $startTime, | ||
| ?MessageSpecifier | $submitButtonLabel = null ) |
Definition at line 163 of file EditConstraintFactory.php.
| MediaWiki\EditPage\Constraint\EditConstraintFactory::newEditFilterMergedContentHookConstraint | ( | Content | $content, |
| IContextSource | $context, | ||
| string | $summary, | ||
| bool | $minorEdit, | ||
| UserIdentity | $user ) |
Definition at line 72 of file EditConstraintFactory.php.
| MediaWiki\EditPage\Constraint\EditConstraintFactory::newLinkPurgeRateLimitConstraint | ( | RateLimitSubject | $subject | ) |
| RateLimitSubject | $subject |
Definition at line 117 of file EditConstraintFactory.php.
| MediaWiki\EditPage\Constraint\EditConstraintFactory::newPageSizeConstraint | ( | int | $contentSize, |
| string | $type ) |
| int | $contentSize | |
| string | $type |
Definition at line 95 of file EditConstraintFactory.php.
| MediaWiki\EditPage\Constraint\EditConstraintFactory::newReadOnlyConstraint | ( | ) |
Definition at line 106 of file EditConstraintFactory.php.
| MediaWiki\EditPage\Constraint\EditConstraintFactory::newRedirectConstraint | ( | ?LinkTarget | $allowedProblematicRedirectTarget, |
| Content | $newContent, | ||
| ?Content | $originalContent, | ||
| PageReference | $page, | ||
| MessageSpecifier | $errorMessageWrapper, | ||
| ?string | $contentFormat ) |
Definition at line 144 of file EditConstraintFactory.php.
Referenced by MediaWiki\EditPage\EditPage\getPreviewText().
| MediaWiki\EditPage\Constraint\EditConstraintFactory::newSpamRegexConstraint | ( | string | $summary, |
| ?string | $sectionHeading, | ||
| string | $text, | ||
| string | $reqIP, | ||
| PageReference | $page ) |
Definition at line 126 of file EditConstraintFactory.php.
| const MediaWiki\EditPage\Constraint\EditConstraintFactory::CONSTRUCTOR_OPTIONS |
Definition at line 39 of file EditConstraintFactory.php.