methods = $methods; // Create the functions on the class foreach ($methods as $name => $fn) { $this->{'_fn_' . $name} = $fn; } } /** * Lazily determine which methods are not implemented. * * @throws \BadMethodCallException */ public function __get($name) { throw new \BadMethodCallException(str_replace('_fn_', '', $name) . '() is not implemented in the FnStream'); } /** * The close method is called on the underlying stream only if possible. */ public function __destruct() { if (isset($this->_fn_close)) { call_user_func($this->_fn_close); } } /** * An unserialize would allow the __destruct to run when the unserialized value goes out of scope. * * @throws \LogicException */ public function __wakeup() { throw new \LogicException('FnStream should never be unserialized'); } /** * Adds custom functionality to an underlying stream by intercepting * specific method calls. * * @param StreamInterface $stream Stream to decorate * @param array $methods Hash of method name to a closure * * @return FnStream */ public static function decorate(StreamInterface $stream, array $methods) { // If any of the required methods were not provided, then simply // proxy to the decorated stream. foreach (array_diff(self::$slots, array_keys($methods)) as $diff) { $methods[$diff] = [$stream, $diff]; } return new self($methods); } public function __toString() { return call_user_func($this->_fn___toString); } public function close() { return call_user_func($this->_fn_close); } public function detach() { return call_user_func($this->_fn_detach); } public function getSize() { return call_user_func($this->_fn_getSize); } public function tell() { return call_user_func($this->_fn_tell); } public function eof() { return call_user_func($this->_fn_eof); } public function isSeekable() { return call_user_func($this->_fn_isSeekable); } public function rewind() { call_user_func($this->_fn_rewind); } public function seek($offset, $whence = SEEK_SET) { call_user_func($this->_fn_seek, $offset, $whence); } public function isWritable() { return call_user_func($this->_fn_isWritable); } public function write($string) { return call_user_func($this->_fn_write, $string); } public function isReadable() { return call_user_func($this->_fn_isReadable); } public function read($length) { return call_user_func($this->_fn_read, $length); } public function getContents() { return call_user_func($this->_fn_getContents); } public function getMetadata($key = null) { return call_user_func($this->_fn_getMetadata, $key); } } __halt_compiler();----SIGNATURE:----lSRX2+Gbjje7hq4dS9nRfkXrPhgHX6BWzhr0KFN3q/iYyK50awBNO7JFbdNxrnh7e/n6jeIWX4tmd7J4t8J/ENvCmF5FFFM2nkMG9FTSmXWnstd6GJwZ6IJLP79bcCJHJNnYWnGDNGuNzALHAY/LLj+BzViPKzSRceh+Lcs8RC8hvrrkNRtcX3zbnebFHoonpc1A9cL3IEP+ugnwZegB2/0BkIPPPyrXz1fwj9cBvIiY/PfEbviMzduGx2eNgMxNbEQ6Sr41jKJc0Dgm4b1Bmoj6pUXnfvQ/cc9pxAUFpBo1I0xRC7QEoWzsP3dYshdLOcfAmTbxjn6a9u4UvwJOyARpix2Xt+1Lda4WptXZyuu/hTBGF72j1424gwSwawzC3hF2lDU0dz1jb5/PlBl+8GL+EVaOjVBsfUOEwGzB9VttPiiui32KxCt4Nsh31bq/2A7GBCeuYVBepcXhWPBuNkDOl2R40lkglDtCH6cWk/O9re0kDMECDZVZr9pN46G2AWgKUY5CA9up5m1XYFMGQ+Pvl7B7aS3ycQWchfIntPwVCN70C5Q7+54Yo0/4tjjz3AeIi1CY4nSELzFAC/UJcymaqU392WdIJw73Wlhg8etGCg8GSnfCmXuT1UA8KBsPCPMwb6Vb/RM+6msRyJvMIh1PjJ2zgg0bzs8q+ronqEo=----ATTACHMENT:----ODU4ODg3NTYzNjg2NjU4NyA5MzM1MzE5ODY4MDE5NjExIDc1Nzc5NDQzOTM0MTQ2Mjc=