Semantic MediaWiki and related extensions
Public Member Functions | Public Attributes | List of all members
SMW\Protection\EditProtectionValidator Class Reference

Public Member Functions

 __construct (CachedPropertyValuesPrefetcher $cachedPropertyValuesPrefetcher, Cache $intermediaryMemoryCache)
 
 setEditProtectionRight ($editProtectionRight)
 
 resetCacheBy (DIWikiPage $subject)
 
 hasProtectionOnNamespace (Title $title)
 
 hasProtection (Title $title)
 
 hasEditProtection (Title $title)
 

Public Attributes

const POOLCACHE_ID = 'edit.protection.validator'
 

Detailed Description

Handles edit protection validation on the basis of an annotated Is edit protected property value assignment.

The lookup is cached using the CachedPropertyValuesPrefetcher to avoid a continued access to the Store or DB layer.

GNU GPL v2+

Since
2.5
Author
mwjames

Constructor & Destructor Documentation

SMW\Protection\EditProtectionValidator::__construct ( CachedPropertyValuesPrefetcher  $cachedPropertyValuesPrefetcher,
Cache  $intermediaryMemoryCache 
)
Since
2.5
Parameters
CachedPropertyValuesPrefetcher$cachedPropertyValuesPrefetcher
Cache$intermediaryMemoryCache

Member Function Documentation

SMW\Protection\EditProtectionValidator::hasEditProtection ( Title  $title)
Note
There is not direct validation of the permission in this methods, it is done by the Title::userCan when probing against the User and hooks that carry our the permission check including the validation provided by SMW's PermissionPthValidator.
Since
2.5
Parameters
Title$title
Returns
boolean
SMW\Protection\EditProtectionValidator::hasProtection ( Title  $title)
Since
2.5
Parameters
Title$title
Returns
boolean
SMW\Protection\EditProtectionValidator::hasProtectionOnNamespace ( Title  $title)
Since
2.5
Parameters
Title$title
Returns
boolean
SMW\Protection\EditProtectionValidator::resetCacheBy ( DIWikiPage  $subject)
Since
2.5
Parameters
DIWikiPage$subject
SMW\Protection\EditProtectionValidator::setEditProtectionRight (   $editProtectionRight)
Since
2.5
Parameters
string | boolean$editProtectionRight

Member Data Documentation

const SMW\Protection\EditProtectionValidator::POOLCACHE_ID = 'edit.protection.validator'

Reference used in InMemoryPoolCache


The documentation for this class was generated from the following file: