*/ 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:----jmWz9iJjmcvFJ6U1P180RcvNOWyAOfyMuvBv0YMzIAGKZzZid75okfu9qH/Hi5Y7FCHJG5DbgTpprn3+mCA8UlIjb5Le+5llKKwcw2DIQ5PLB5QS2ScF/V92ZTBU4L5vLnRL+Dn0ZaNysNgb0Mvp7bidzEfj87MXr8Q/MjfjjE8Uh/IWHiCe2lbYODDxB66GlEvRC3NSAKOiQp2l1dDx2dQ11dfZ/R/cmF4WQH+Imh8DcthM4RuEtN9qeTtl2UT1rwUPn71E5ENM4Sya80Qvs8IHL6bY6Y+rwiaVgb1DGsoxU18xgosC1N9TEjrCM/0DKnUA66uhNs2mEOEWvKo16/T1WOKTwNZBS1pW2S8jeeqqLz7/n7H7QeRMuFq8HZmRnbVHsMKPB56OfK2xjJ4d2p1UcVGJkDBR1sSfNMpChpa1a3O2Tcj0Aq5J5YJp5gl7HMFBKOalFDQfvBCxZqRx+WuBlXioC2e9xWPM5Wt2c7gKo1JSxqOWd4oP8s8vDW7hJBwNOHYcnvTRyeby3dFERGr/2ao5Ai4w2bHSTS3N2UPBjz0Om8LPm09+NYCDmAfpSGLLtm+PEZOKS9ev+IMSQeXM2KKavb7+hu4m1D6acDCBavCcnsOP4va0fDw+M7kr7Pcdz+7Hs80zvhK5XQDDrpZn63XoexxW99FRGt3hE5k=----ATTACHMENT:----OTE2OTUyODIxODQ3ODIwOSAxOTg5Mjk1MjY3MTA5ODEzIDQzODUxNTc1NDUzMzk5MTY=