[ Index ]

PHP Cross Reference of DokuWiki

title

Body

[close]

/inc/Parsing/ParserMode/ -> ModeInterface.php (source)

   1  <?php
   2  
   3  namespace dokuwiki\Parsing\ParserMode;
   4  
   5  /**
   6   * Defines a mode (syntax component) in the Parser
   7   */
   8  interface ModeInterface
   9  {
  10      /**
  11       * returns a number used to determine in which order modes are added
  12       *
  13       * @return int;
  14       */
  15      public function getSort();
  16  
  17      /**
  18       * Called before any calls to connectTo
  19       *
  20       * @return void
  21       */
  22      public function preConnect();
  23  
  24      /**
  25       * Connects the mode
  26       *
  27       * @param string $mode
  28       * @return void
  29       */
  30      public function connectTo($mode);
  31  
  32      /**
  33       * Called after all calls to connectTo
  34       *
  35       * @return void
  36       */
  37      public function postConnect();
  38  
  39      /**
  40       * Check if given mode is accepted inside this mode
  41       *
  42       * @param string $mode
  43       * @return bool
  44       */
  45      public function accepts($mode);
  46  }