소스 검색

Add IOInterface::isDecorated()

Jordi Boggiano 13 년 전
부모
커밋
66a202083e
3개의 변경된 파일23개의 추가작업 그리고 0개의 파일을 삭제
  1. 8 0
      src/Composer/IO/ConsoleIO.php
  2. 7 0
      src/Composer/IO/IOInterface.php
  3. 8 0
      src/Composer/IO/NullIO.php

+ 8 - 0
src/Composer/IO/ConsoleIO.php

@@ -55,6 +55,14 @@ class ConsoleIO implements IOInterface
         return $this->input->isInteractive();
     }
 
+    /**
+     * {@inheritDoc}
+     */
+    public function isDecorated()
+    {
+        return $this->output->isDecorated();
+    }
+
     /**
      * {@inheritDoc}
      */

+ 7 - 0
src/Composer/IO/IOInterface.php

@@ -33,6 +33,13 @@ interface IOInterface
      */
     function isVerbose();
 
+    /**
+     * Is this output decorated?
+     *
+     * @return Boolean
+     */
+    function isDecorated();
+
     /**
      * Writes a message to the output.
      *

+ 8 - 0
src/Composer/IO/NullIO.php

@@ -35,6 +35,14 @@ class NullIO implements IOInterface
         return false;
     }
 
+    /**
+     * {@inheritDoc}
+     */
+    public function isDecorated()
+    {
+        return false;
+    }
+
     /**
      * {@inheritDoc}
      */