Page MenuHomeWickedGov Phorge

SingleLineContext.php
No OneTemporary

Size
526 B
Referenced Files
None
Subscribers
None

SingleLineContext.php

<?php
declare( strict_types = 1 );
namespace Wikimedia\Parsoid\Html2Wt;
/**
* Stack and helpers to enforce single-line context while serializing.
*/
class SingleLineContext {
// PORT-TODO document
private array $stack = [];
public function enforce(): void {
$this->stack[] = true;
}
public function enforced(): bool {
return count( $this->stack ) > 0 && end( $this->stack );
}
public function disable(): void {
$this->stack[] = false;
}
public function pop(): void {
array_pop( $this->stack );
}
}

File Metadata

Mime Type
text/x-php
Expires
Aug 19 2026, 19:01 (6 w, 4 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
4b/ae/f3e65082e93d102f640b0425724c
Default Alt Text
SingleLineContext.php (526 B)

Event Timeline