[ Index ]

PHP Cross Reference of vtigercrm-6.1.0

title

Body

[close]

/libraries/htmlpurifier/library/HTMLPurifier/ConfigSchema/Interchange/ -> Id.php (source)

   1  <?php
   2  
   3  /**
   4   * Represents a directive ID in the interchange format.
   5   */
   6  class HTMLPurifier_ConfigSchema_Interchange_Id
   7  {
   8  
   9      public $namespace, $directive;
  10  
  11      public function __construct($namespace, $directive) {
  12          $this->namespace = $namespace;
  13          $this->directive = $directive;
  14      }
  15  
  16      /**
  17       * @warning This is NOT magic, to ensure that people don't abuse SPL and
  18       *          cause problems for PHP 5.0 support.
  19       */
  20      public function toString() {
  21          return $this->namespace . '.' . $this->directive;
  22      }
  23  
  24      public static function make($id) {
  25          list($namespace, $directive) = explode('.', $id);
  26          return new HTMLPurifier_ConfigSchema_Interchange_Id($namespace, $directive);
  27      }
  28  
  29  }
  30  
  31  // vim: et sw=4 sts=4


Generated: Fri Nov 28 20:08:37 2014 Cross-referenced by PHPXref 0.7.1