PHP Класс HippoPHP\Hippo\File

Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$encoding string Encoding of the file.
$filename string Filename.
$lines array Lines of the file.
$source string Source code within the file.

Открытые методы

Метод Описание
__construct ( string $filename = null, string $source = null, string $encoding = 'UTF-8' ) : File Create a new file representation.
getEncoding ( ) : string Return the file encoding.
getFilename ( ) : string Return the filename.
getLines ( ) : array Return the individual array of lines.
getSource ( ) : string Return the source of the file.

Приватные методы

Метод Описание
buildLinesFromSource ( string $source ) : array
extractNextLine ( string $source, array $eols, string &$eolUsed ) : string

Описание методов

__construct() публичный метод

Create a new file representation.
public __construct ( string $filename = null, string $source = null, string $encoding = 'UTF-8' ) : File
$filename string
$source string
$encoding string
Результат File

getEncoding() публичный метод

Return the file encoding.
public getEncoding ( ) : string
Результат string

getFilename() публичный метод

Return the filename.
public getFilename ( ) : string
Результат string

getLines() публичный метод

Return the individual array of lines.
public getLines ( ) : array
Результат array

getSource() публичный метод

Return the source of the file.
public getSource ( ) : string
Результат string

Описание свойств

$encoding защищенное свойство

Encoding of the file.
protected string $encoding
Результат string

$filename защищенное свойство

Filename.
protected string $filename
Результат string

$lines защищенное свойство

Lines of the file.
protected array $lines
Результат array

$source защищенное свойство

Source code within the file.
protected string $source
Результат string