Permalink
Browse files

generate the tgz

  • Loading branch information...
1 parent fe43c82 commit cba42b53b01222d90aa14c2fc0ac521a6b51b86f @iannsp iannsp committed Aug 3, 2011
Showing with 10 additions and 10 deletions.
  1. BIN PEAR2_Console_Color-0.1.0.tgz
  2. +2 −2 package.xml
  3. +8 −8 src/Console/Color.php
Binary file not shown.
View
@@ -28,8 +28,8 @@ Package PEAR2_CacheSystem API release notes for version 0.1.0.</notes>
<contents>
<dir name="/">
<dir name="src" baseinstalldir="PEAR2">
- <dir name="Console_Color">
- <file role="php" name="Main.php"/>
+ <dir name="Console/">
+ <file role="php" name="Color.php"/>
</dir>
</dir>
</dir>
View
@@ -10,7 +10,7 @@
* @copyright 2011 Ivo Nascimento
* @license http://www.opensource.org/licenses/bsd-license.php New BSD License
* @version SVN: $Id$
- * @link
+ * @link
*/
/**
@@ -27,7 +27,7 @@
class Color
{
/**
- *
+ *
* add constant values to values retrieved by specific mappers
* @param string $value the value form the mappers
* @return string the final value to command line
@@ -37,7 +37,7 @@ private static function decorateValue($value){
return "\033[".$value.'m';
}
/**
- *
+ *
* get the value into mappers
* @param string $value the value the user insert in text
* @return string
@@ -51,7 +51,7 @@ private static function get($value){
}
else if ( strtolower($diff) == $diff)
{
- $returnvalue = ColorMapper::get($value);
+ $returnvalue = ColorMapper::get($value);
}
else
{
@@ -64,12 +64,12 @@ private static function get($value){
throw New \Exception( "Value {$value} not found" );
}
/**
- *
+ *
* search values into string and replace with mapped values
* @param string $string
* @access public
* @return string
- */
+ */
public static function convert($string){
$string = self::sanitize($string);
$matches = self::getPatterns($string);
@@ -78,11 +78,11 @@ public static function convert($string){
$newvalue ="";
if ( is_array( ($keys=self::get($key)))){
foreach ($keys as $ikey){
- $newvalue .= self::decorateValue( $ikey ) ;
+ $newvalue .= self::decorateValue( $ikey ) ;
}
}else
$newvalue = self::decorateValue(
- self::get($key)) ;
+ self::get($key)) ;
$string = str_replace($key, $newvalue, $string);
}
}

0 comments on commit cba42b5

Please sign in to comment.