Example #1
0
 /**
  * Get a parameter value
  *
  * @param  string $param MIME type parameter
  * @return string Value
  * @static
  */
 function getValue($param)
 {
     $tmp = explode('=', $param);
     $value = $tmp[1];
     if (MIME_Type_Parameter::hasComment($param)) {
         $cs = strpos($value, '(');
         $value = substr($value, 0, $cs);
     }
     return trim($value, '" ');
 }
 public function testGetCommentNone()
 {
     $this->assertEquals('', MIME_Type_Parameter::getComment('a="parameter"'));
 }