2017 © Pedro Peláez
 

library php-file-stream

Big file creation helper. May be used for sitemap.xml or YML files creation.

image

pastuhov/php-file-stream

Big file creation helper. May be used for sitemap.xml or YML files creation.

  • Friday, February 17, 2017
  • by pastuhov
  • Repository
  • 1 Watchers
  • 4 Stars
  • 10,001 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 5 Versions
  • 7 % Grown

The README.md

php-file-stream

Build Status Scrutinizer Code Quality Code Coverage Total Downloads, (*1)

A PHP class to generate sitemap files for large web-sites or YML (Yandex Market Language) files, (*2)

Install

Via Composer, (*3)

``` bash $ composer require pastuhov/php-file-stream, (*4)


## Features * transparent file splitting (multiple sitemaps) * fast and safe file replacement from tmp to public directory * dependencies: 0 ## Usage ### Simple YML export ```php $stream = new FileStream( '/tmp/export.yml' ); $stream->write('<yml_catalog date="2010-04-01 17:00">'); ... $stream->write('</yml_catalog>');

Advanced usage (large site sitemap, >10k urls)


$stream = new FileStream( '/tmp/sitemap{count}.xml', '<urlset>', '</urlset>', 10000 ); foreach ($urls as $url) { $stream->write( '<url><loc>' . $url . '</loc></url>' . PHP_EOL ); }

Testing

``` bash $ composer test, (*5)

or
```bash
$ phpunit

Security

If you discover any security related issues, please email kirill@pastukhov.su instead of using the issue tracker., (*6)

Credits

License

GNU General Public License, version 2. Please see License File for more information., (*7)

The Versions

17/02 2017

dev-master

9999999-dev https://github.com/pastuhov/php-file-stream

Big file creation helper. May be used for sitemap.xml or YML files creation.

  Sources   Download

GPL-2.0

The Requires

  • php >=5.4.0

 

The Development Requires

yml stream sitemap export.yml

17/02 2017

v1.0.2

1.0.2.0 https://github.com/pastuhov/php-file-stream

Big file creation helper. May be used for sitemap.xml or YML files creation.

  Sources   Download

GPL-2.0

The Requires

  • php >=5.4.0

 

The Development Requires

yml stream sitemap export.yml

03/06 2016

v1.0.1

1.0.1.0 https://github.com/pastuhov/php-file-stream

Big file creation helper. May be used for sitemap.xml or YML files creation.

  Sources   Download

GPL-2.0

The Requires

  • php >=5.4.0

 

The Development Requires

yml stream sitemap export.yml

25/03 2016

dev-pastuhov-patch-1

dev-pastuhov-patch-1 https://github.com/pastuhov/php-file-stream

Big file creation helper. May be used for sitemap.xml or YML files creation.

  Sources   Download

GPL-2.0

The Requires

  • php >=5.3.0

 

The Development Requires

yml stream sitemap export.yml

20/06 2015

v1.0

1.0.0.0 https://github.com/pastuhov/php-file-stream

Big file creation helper. May be used for sitemap.xml or YML files creation.

  Sources   Download

GPL-2.0

The Requires

  • php >=5.3.0

 

The Development Requires

yml stream sitemap export.yml