Source for file Lang.php

Documentation is available at Lang.php

  1. <?php
  2.  
  3. /**
  4.  * Post-transform that copies lang's value to xml:lang (and vice-versa)
  5.  * @note Theoretically speaking, this could be a pre-transform, but putting
  6.  *        post is more efficient.
  7.  */
  8. {
  9.     
  10.     public function transform($attr$config$context{
  11.         
  12.         $lang     = isset($attr['lang']$attr['lang'false;
  13.         $xml_lang = isset($attr['xml:lang']$attr['xml:lang'false;
  14.         
  15.         if ($lang !== false && $xml_lang === false{
  16.             $attr['xml:lang'$lang;
  17.         elseif ($xml_lang !== false{
  18.             $attr['lang'$xml_lang;
  19.         }
  20.         
  21.         return $attr;
  22.         
  23.     }
  24.     
  25. }

Documentation generated on Thu, 19 Jun 2008 18:49:39 -0400 by phpDocumentor 1.4.2