This page is stub.

MyTextSanitizer class has many deprecated methods. It exists for the compatibility only, so don't use this class for your 2.1 modules.

If you aren't the expert having the technical knowledge of MyTextSanitizer, you should not plan to extend this class. This class is a kind of final classes, and this class isn't used for pleomorphism. So you don't need to define the sub class of MyTextSanitizer for the diff programming.


 $yourSanitizer =& new YourSanitizer();
 $text $yourSanitizer->xxxx($text);

In this case, YourSanitizer doesn't need to implement the same interfaces as MyTextSanitizer. If you want to call some methods of MyTextSanitizer for diff programming, your class should encapsulate the exitence of MyTextSanitizer as the following.


 class YourTextSanitizer
 {
   var $_mytextsanitizer;
   
   function YourTextSanitizer()
   {
     $this->_mytextsanitizer =& MyTextSanitizer::getInstance();
   }
   
   function xxxx($text)
   {
      $text =& $this->_mytextsanitizer->xxxx($text);
      
      // TODO your code
      ...
      
      return $text;
   }
 }

The case which your class should extend MyTextSanitizer is the following.

MyTextA.png

 class Foo
 {
   /***
    * The text filter for this object.
    * @var MyTextSanitizer
    */
   var $_mSanitizer null;
   
   function changeSanitizer(&$filter)
   {
     $this->_filter =& $filter;
   }
   
   function renderText()
   {
     return $this->_mSanitizer->XXXX($this->_mMessage);
   }
 }

This case is the pleomorphism mechanism. If you are under TYPE SAFE policy, you may use interfaces of MyTextSanitizer under your policy. But, you can define the special interface to process this case instead of MyTextSanitizer interfaces.

MyTextB.png

This thing means that any inevitability to extend MyTextSanitizer aren't there.

And, if you develop your module as Legacy 2.1 only modules, you should use not MyTextSanitizer but XCube_TextFilter.


Front page   Freeze Diff Backup Copy Rename ReloadPrint View   New Page Page list Search Recent changes   Help   RSS of recent changes (RSS 1.0) RSS of recent changes (RSS 2.0) RSS of recent changes (RSS Atom) Powered by xpWiki
Counter: 13948, today: 2, yesterday: 0
Princeps date: 2007-01-11 (Thu) 23:10:56
Last-modified: 2007-01-11 (Thu) 23:10:56 (JST) (4607d) by minahito

Welcome | News | Overview | Documentation | Forum | Tutorialstop
Brasilian | French | German | Greek | Japanese | Korean | Russian | T-Chinese
Powered by XOOPS Cube 2001-2011 The XOOPS Cube Project