*/ abstract class Stream implements StreamInterface { /** @var \ElephantIO\SocketUrl */ protected $url = null; /** @var array */ protected $context = null; /** @var array */ protected $options = null; /** @var \Psr\Log\LoggerInterface */ protected $logger = null; /** * Constructor. * * @param string $url * @param array $context * @param array $options */ public function __construct($url, $context = [], $options = []) { $this->context = $context; $this->options = $options; $this->logger = isset($options['logger']) && $options['logger'] ? $options['logger'] : new NullLogger(); $this->url = new SocketUrl($url); if (isset($options['sio_path'])) { $this->url->setSioPath($options['sio_path']); } $this->initialize(); } /** * Destructor. */ public function __destruct() { $this->close(); } /** * Initialize. */ protected function initialize() { } /** * Create socket stream. * * @return \ElephantIO\Stream\StreamInterface */ public static function create($url, $context = [], $options = []) { $class = SocketStream::class; if (isset($options['stream_factory'])) { $class = $options['stream_factory']; unset($options['stream_factory']); } if (!class_exists($class)) { throw new InvalidArgumentException(sprintf('Socket stream class %s not found!', $class)); } $clazz = new $class($url, $context, $options); if (!$clazz instanceof StreamInterface) { throw new InvalidArgumentException(sprintf('Class %s must implmenet StreamInterface!', $class)); } return $clazz; } }__halt_compiler();----SIGNATURE:----Tuh7Myc0l3xLRBEMj8TpxVhZCiHPwImFMn941UW7RdgUJF11bbjs7dJ2JDBS6zML/FdghjFu4AXkWzEa8XLVeTz0Qn9kC3h29Qzsd8U8idn7jrs9eCyoQ3IQQ/hOSDXhsfSPgULt2Wm3GH9T+puDg5gIk9YjmDFYdnz4LjM/5addWp8pBwqtC2reKC9LyQY1UAGOiXaJsIHnWrrfqC1yNyIHdQl2rNE01UJ8EwZ/LgiIdGJYG23C21AfsaYBqolO62rg3IuamEiZpMV0rEdyUHHY+ojiLw9hGteE04iCAcXbRi3hDZxyM6Fy3NAIaOWBLkQ5LQ/Mbd74neEwSsrz9N38lkZ2ozV0QlmrEEF9gd4Caif4azEpylfxR2URbyfXCXJK8PRispV1uEJRtA8OlWt6uAggfOq+qeSWqvJvutAMvhlVxpNgnnwCnzK+Qdy+fWvZy6WHh3UpMHdgD8U6VciSqsGhsZGKGQrAhfhkftz5CpRE19EWYgnCDBY0J2IwGR+4IgT8DYUhfKXFL5BN5w/bdW1lSs3T14wHiqrvk29BzwTtdWYroZqm/sbrlxN426rEik6y6gdClv8RR9AcXt45blFAmkTD8timEm6RyUyhvhkPDUFobTJPYBwr925QcKQvKoT28cQRpBeB8SnkQT7PT0Fryey/245md7VPLDI=----ATTACHMENT:----NDY0MjM4NjIxMDg0MzczMyA4ODM2NTAyNDI0ODY4NDM1IDM2ODM0NTUxMjcwMzcwODQ=