asNtext() 공개 메소드

Formats the value as an HTML-encoded plain text with newlines converted into breaks.
public asNtext ( string $value ) : string
$value string the value to be formatted.
리턴 string the formatted result.
예제 #1
0
 public function testAsNtext()
 {
     $value = '123';
     $this->assertSame($value, $this->formatter->asNtext($value));
     $value = 123;
     $this->assertSame("{$value}", $this->formatter->asNtext($value));
     $value = '<>';
     $this->assertSame('&lt;&gt;', $this->formatter->asNtext($value));
     $value = "123\n456";
     $this->assertSame("123<br />\n456", $this->formatter->asNtext($value));
     // null display
     $this->assertSame($this->formatter->nullDisplay, $this->formatter->asNtext(null));
 }