• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Add own code to XenForo_DataWriter::_postSave


Well-known member
I'm having some code, which i'd like to run inside most of the DataWriterts.
Instead of creating a proxy class for each dw, couldn't i add something to the XenForo_DataWriter ?


Well-known member
I thought that
  static $baseExtended = false;
   public static function loadClassDatawriter($class, &$extend){

     if (!self::$baseExtended && in_array($class, self::getDataWritersForLog())){
       self::$baseExtended = true;
       $extend[] = 'Foo_Extend_XenForo_DataWriter';
wouldn't work, but it does:)