/** * 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 testHasCommentNegative() { $this->assertFalse(MIME_Type_Parameter::hasComment('a="parameter"')); $this->assertFalse(MIME_Type_Parameter::hasComment('foo=bar')); }