Recommend this page to a friend! |
Download |
Info | Documentation | Files | Install with Composer | Download | Reputation | Support forum | Blog | Links |
Ratings | Unique User Downloads | Download Rankings | ||||
Not enough user ratings | Total: 232 | All time: 8,135 This week: 455 |
Version | License | PHP version | Categories | |||
file-pager 1.0.0 | Custom (specified... | 5 | PHP 5, Files and Folders |
Description | Author | |||||||||||||||||||||||
This package can output files split into pages of limited length. Innovation Award |
|
This is a simple extension is written in PHP intended to divide a file into pages.
$ composer require nstdio/file-pager: "dev-master"
or add
"nstdio/file-pager": "dev-master"
to the require
section of your composer.json
file.
<?php
use nstdio\FilePager;
$fileName = "path/to/file";
$pageSize = 25; // lines count on page.
$pager = new FilePager($fileName, $pageSize);
$pager->setLineSeparator(LineSeparator::HTML); // All control characters will be trimmed out.
$pager->prependLine('#{line}') // prepend string to line. Available tokens {line}, {pageLine}, {path}, {file}, {dir}, {page}.
->append("{page}.");
echp $pager->getPage(1);
Files (18) |
File | Role | Description | ||
---|---|---|---|---|
src (9 files) | ||||
tests (6 files) | ||||
composer.json | Data | Auxiliary data | ||
LICENSE | Lic. | License text | ||
README.md | Doc. | Documentation |
Files (18) | / | src |
File | Role | Description |
---|---|---|
Cache.php | Class | Class source |
CacheItem.php | Class | Class source |
CorruptedDataException.php | Class | Class source |
File.php | Class | Class source |
FilePager.php | Class | Class source |
Handler.php | Class | Class source |
LineSeparator.php | Class | Class source |
Output.php | Class | Class source |
OutputInterface.php | Class | Class source |
Files (18) | / | tests |
File | Role | Description |
---|---|---|
ClosureAsOutputHandlerTest.php | Class | Class source |
FileSystemTest.php | Class | Class source |
MockFile.php | Class | Class source |
OutputTest.php | Class | Class source |
PageSizeTest.php | Class | Class source |
phpunit.xml | Data | Auxiliary data |
The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page. |
Install with Composer |
Version Control | Unique User Downloads | Download Rankings | |||||||||||||||
100% |
|
|
Applications that use this package |
If you know an application of this package, send a message to the author to add a link here.