https://github.com/aedart/athenaeum-streams
[READ ONLY] Athenaeum Streams package - see https://github.com/aedart/athenaeum
https://github.com/aedart/athenaeum-streams
Last synced: 6 months ago
JSON representation
[READ ONLY] Athenaeum Streams package - see https://github.com/aedart/athenaeum
- Host: GitHub
- URL: https://github.com/aedart/athenaeum-streams
- Owner: aedart
- License: bsd-3-clause
- Created: 2022-02-28T15:35:59.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2025-11-24T08:01:31.000Z (8 months ago)
- Last Synced: 2025-11-27T21:19:31.611Z (8 months ago)
- Language: PHP
- Size: 80.1 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Streams
The "streams" package offers an extended version of [PSR-7's](https://www.php-fig.org/psr/psr-7/#13-streams) defined `StreamInterface`;
a wrapper for common stream operations, mostly intended for file streams.
```php
use Aedart\Streams\FileStream;
$stream = FileStream::open('my-file.txt')
->put('Hi there');
$more = FileStream::openMemory()
->put("\nMore things to show...")
->positionToStart();
$stream
->append($more);
echo (string) $stream; // Hi there
// More things to show...
```
## Motivation
There are many good alternatives to this package. Sadly, some of those alternatives makes it unreasonably difficult to extend their offered functionality.
Therefore, while this package offers similar or identical functionality as some of those alternatives, it allows you (_and encourages you_) to extend the functionality that is provided by this package.
```php
use Aedart\Streams\FileStream;
class TranscriptFileStream extends FileStream
{
// ...your domain-specific logic here ...
}
```
## Documentation
Please read the [official documentation](https://aedart.github.io/athenaeum/) for additional information.
## Repository
The mono repository is located at [github.com/aedart/athenaeum](https://github.com/aedart/athenaeum)
## Versioning
This package follows [Semantic Versioning 2.0.0](http://semver.org/)
## License
[BSD-3-Clause](http://spdx.org/licenses/BSD-3-Clause), Read the LICENSE file included in this package