Buffer
in package
FinalYes
Table of Contents
Properties
- $lines : array<string|int, mixed>
- $unindentStrategy : UnindentStrategy
Methods
- __construct() : mixed
- clear() : void
- count() : int
- get() : string
- getLastLine() : string|null
- getLines() : array<string|int, string>
- getLinesString() : string
- has() : bool
- isEmpty() : bool
- pop() : string|null
- push() : void
- set() : void
- trimLines() : void
- detectIndentation() : int
- unIndent() : void
Properties
$lines
private
array<string|int, mixed>
$lines
= []
$unindentStrategy
private
UnindentStrategy
$unindentStrategy
= UnindentStrategy::ALL
Methods
__construct()
public
__construct([array<string|int, string> $lines = [] ][, UnindentStrategy $unindentStrategy = UnindentStrategy::ALL ]) : mixed
Parameters
- $lines : array<string|int, string> = []
- $unindentStrategy : UnindentStrategy = UnindentStrategy::ALL
clear()
public
clear() : void
count()
public
count() : int
Return values
intget()
public
get(int $key) : string
Parameters
- $key : int
Return values
stringgetLastLine()
public
getLastLine() : string|null
Return values
string|nullgetLines()
public
getLines() : array<string|int, string>
Return values
array<string|int, string>getLinesString()
public
getLinesString() : string
Return values
stringhas()
public
has(int $key) : bool
Parameters
- $key : int
Return values
boolisEmpty()
public
isEmpty() : bool
Return values
boolpop()
public
pop() : string|null
Return values
string|nullpush()
public
push(string $line) : void
Parameters
- $line : string
set()
public
set(int $key, string $line) : void
Parameters
- $key : int
- $line : string
trimLines()
public
trimLines() : void
detectIndentation()
private
detectIndentation() : int
Return values
intunIndent()
private
unIndent() : void