Reads the contents of the file in the beginning.

package pomo
inherited_from \POMO_StringReader

 Methods

PHP4 constructor.

POMO_CachedFileReader($filename) 
deprecated 5.4.0 Use __construct() instead.
see

Parameters

$filename

PHP4 constructor.

POMO_Reader() 
Inherited
deprecated 5.4.0 Use __construct() instead.
see

PHP4 constructor.

POMO_StringReader($str = ''
Inherited
deprecated 5.4.0 Use __construct() instead.
see

Parameters

$str

PHP5 constructor.

__construct($filename) 
inherited_from \POMO_StringReader::__construct()

Parameters

$filename

PHP5 constructor.

__construct() 
Inherited

close()

close() : true
Inherited

Returns

true

is_resource()

is_resource() : true
Inherited

Returns

true

length()

length() : integer
Inherited

Returns

integer

pos()

pos() : integer
Inherited

Returns

integer

read()

read(string $bytes) : string
Inherited

Parameters

$bytes

string

Returns

string

read_all()

read_all() : string
Inherited

Returns

string

Reads a 32bit Integer from the Stream

readint32() : mixed
Inherited

Returns

mixedThe integer, corresponding to the next 32 bits from the stream of false if there are not enough bytes or on error

Reads an array of 32-bit Integers from the Stream

readint32array(integer $count) : mixed
Inherited

Parameters

$count

integer

How many elements should be read

Returns

mixedArray of integers or false if there isn't enough data or on error

seekto()

seekto(integer $pos) : integer
Inherited

Parameters

$pos

integer

Returns

integer

Sets the endianness of the file.

setEndian(string $endian) 
Inherited

Parameters

$endian

string

Set the endianness of the file. Accepts 'big', or 'little'.

str_split()

str_split(string $string, integer $chunk_size) : array
Inherited

Parameters

$string

string

$chunk_size

integer

Returns

array

strlen()

strlen(string $string) : integer
Inherited

Parameters

$string

string

Returns

integer

substr()

substr(string $string, integer $start, integer $length) : string
Inherited

Parameters

$string

string

$start

integer

$length

integer

Returns

string

 Properties

 

$_post

$_post 

Default

''
 

$_str

$_str 

Default

''
 

$endian

$endian 

Default

'little'