本文整理汇总了PHP中Horde_Mime_Part::getDispositionParameter方法的典型用法代码示例。如果您正苦于以下问题:PHP Horde_Mime_Part::getDispositionParameter方法的具体用法?PHP Horde_Mime_Part::getDispositionParameter怎么用?PHP Horde_Mime_Part::getDispositionParameter使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Horde_Mime_Part
的用法示例。
在下文中一共展示了Horde_Mime_Part::getDispositionParameter方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testNullCharactersNotAllowedInMimeHeaderData
public function testNullCharactersNotAllowedInMimeHeaderData()
{
$part = new Horde_Mime_Part();
$part->setType("text/plain");
$this->assertEquals('text/plain', $part->getType());
$part->setDisposition("inline");
$this->assertEquals('inline', $part->getDisposition());
$part->setDispositionParameter('size', '123' . "" . '456');
$this->assertEquals(123456, $part->getDispositionParameter('size'));
$part->setDispositionParameter('foo', "foobar");
$this->assertEquals('foobar', $part->getDispositionParameter('foo'));
$part->setCharset("utf-8");
$this->assertEquals('utf-8', $part->getCharset());
$part->setName("foobar");
$this->assertEquals('foobar', $part->getName());
$this->assertEquals('foobar', $part->getDispositionParameter('filename'));
$this->assertEquals('foobar', $part->getContentTypeParameter('name'));
$part->setLanguage("en");
$this->assertEquals(array('en'), $part->getLanguage());
$part->setLanguage(array("en", "de"));
$this->assertEquals(array('en', 'de'), $part->getLanguage());
$part->setDuration('123' . "" . '456');
$this->assertEquals(123456, $part->getDuration());
$part->setBytes('123' . "" . '456');
$this->assertEquals(123456, $part->getBytes());
$part->setDescription("foobar");
$this->assertEquals('foobar', $part->getDescription());
$part->setContentTypeParameter('foo', "foobar");
$this->assertEquals('foobar', $part->getContentTypeParameter('foo'));
$part->setContentId("foobar");
$this->assertEquals('foobar', $part->getContentId());
}