logbook/class/core/log/Stream.class.php

61 lines
1.2 KiB
PHP

<?php
namespace core\log;
/**
* Interface to manage streaming system
*/
interface Stream
{
/**
* Dispatcher configuration
*
* @var \core\config\Configuration
*/
protected \core\config\Configuration $configuration;
/**
* Tag associated to the stream
*
* @var \core\log\Tag
*/
protected \core\log\Tag $tag;
/**
* Stream constructor
*
* @param \core\config\Configuration $config Dispatcher configuration
*
* @throws \core\config\ConfigException
*/
public function __construct(config: \core\config\Configuration $configuration, tag: \core\log\Tag $tag);
/**
* Push an event to the stream
*
* @param \core\log\Event $event Event to push
*
* @throws \core\log\StreamException
*
* @return \core\log\Event Event pushed
*/
public function push(event: \core\log\Event $event) : \core\log\Event;
/**
* Connect to an existing stream running outside of PHP
*
* @param \core\log\StreamSettings $settings Settings to connect to the stream
*
* @throws \core\log\StreamException
*/
public function connect();
/**
* Close the connection to an existing stream running outside of PHP
*
* @throws \core\log\StreamException
*/
public function close();
}
?>