Exemple #1
0
 /**
  * Get an instance of the appropriate Parser class
  *
  * @param System $system
  * @param array $current
  * @param Tags $tags
  * @return Parser
  */
 public static function getInstance(System $system, array $current, Tags $tags)
 {
     if ($system->hasAnsiSupport()) {
         return new Ansi($current, $tags);
     }
     return new NonAnsi($current, $tags);
 }
Exemple #2
0
 /**
  * Get the height of the terminal
  *
  * @return integer
  */
 public function height()
 {
     return (int) $this->getDimension($this->system->height(), 25);
 }