diff options
Diffstat (limited to 'SemanticMediaWiki/includes/dataitems/SMW_DI_Error.php')
-rw-r--r-- | SemanticMediaWiki/includes/dataitems/SMW_DI_Error.php | 62 |
1 files changed, 0 insertions, 62 deletions
diff --git a/SemanticMediaWiki/includes/dataitems/SMW_DI_Error.php b/SemanticMediaWiki/includes/dataitems/SMW_DI_Error.php deleted file mode 100644 index 110633eb..00000000 --- a/SemanticMediaWiki/includes/dataitems/SMW_DI_Error.php +++ /dev/null @@ -1,62 +0,0 @@ -<?php -/** - * @file - * @ingroup SMWDataItems - */ - -/** - * This class implements error list data items. These data items are used to - * pass around lists of error messages within the application. They are not - * meant to be stored or exported, but they can be useful to a user. - * - * @since 1.6 - * - * @author Markus Krötzsch - * @ingroup SMWDataItems - */ -class SMWDIError extends SMWDataItem { - - /** - * List of error messages. Should always be safe for HTML. - * @var array of strings - */ - protected $m_errors; - - public function __construct( $errors ) { - $this->m_errors = $errors; - } - - public function getDIType() { - return SMWDataItem::TYPE_ERROR; - } - - public function getErrors() { - return $this->m_errors; - } - - public function getSortKey() { - return 'error'; - } - - public function getSerialization() { - return serialize( $this->m_errors ); - } - - /** - * Create a data item from the provided serialization string and type - * ID. - * @todo Be more careful with unserialization. It can create E_NOTICEs. - * @return SMWDIError - */ - public static function doUnserialize( $serialization ) { - return new SMWDIError( unserialize( $serialization ) ); - } - - public function equals( SMWDataItem $di ) { - if ( $di->getDIType() !== SMWDataItem::TYPE_ERROR ) { - return false; - } - - return $di->getSerialization() === $this->getSerialization(); - } -} |