Esempio n. 1
0
 public function __construct($streamData)
 {
     parent::__construct($streamData);
     $unpackFormat = ['vprocessorArchitecture', 'vprocessorLevel', 'vprocessorRevision', 'CnumberOfProcessors', 'CproductType', 'VmajorVersion', 'VminorVersion', 'VbuildNumber', 'VplatformId', 'VCSDVersionRVA', 'vsuiteMask', 'vreserved', 'V3vendorId', 'VversionInformation', 'VfeatureInformation', 'VamdExtendedCPUFeatures'];
     foreach (unpack(implode('/', $unpackFormat), $streamData) as $variable => $value) {
         $this->{$variable} = $value;
     }
 }
 /**
  * 
  * @param string $filename
  * @param string $mode
  */
 public function __construct($filename, $mode = null)
 {
     if ($mode === null) {
         $mode = 'a+b';
     }
     $resource = fopen($filename, $mode);
     parent::__construct($resource);
 }
 /**
  * 
  * @param string $hostname
  * @param int $port
  */
 public function __construct($hostname, $port = null)
 {
     if ($port === null) {
         $port = -1;
     }
     $resource = fsockopen($hostname, $port);
     parent::__construct($resource);
 }
Esempio n. 4
0
 function __construct()
 {
     parent::__construct();
     $this->moudleId = -1;
     $this->id = -1;
     $this->isResult = -1;
     $this->headerIsReaded = false;
 }
Esempio n. 5
0
 /**
  *
  * @param string $data Initial data
  * @param int $memSize Memory limit
  * @param string $mode Open mode
  */
 public function __construct($data = null, $memSize = null, $mode = 'w+')
 {
     $memSize = \intval($memSize);
     $file = 'php://';
     if ($memSize > 0) {
         $file .= "temp/maxmemory:{$memSize}";
     } else {
         $file .= 'memory';
     }
     $stream = Stream::open($file, $mode, false);
     parent::__construct($stream);
     $this->write($data);
 }
Esempio n. 6
0
 /**
  * Wraps around the specified stream.
  * 
  * @param resource $stream The stream to wrap around.
  */
 public function __construct($stream)
 {
     parent::__construct($stream, true);
 }
Esempio n. 7
0
 /**
  * 
  */
 public function __construct()
 {
     $stream = Stream::open('php://output', 'w', false);
     parent::__construct($stream);
 }
Esempio n. 8
0
 public function __construct(string $content)
 {
     $resource = fopen('php://temp', 'r+');
     fwrite($resource, $content);
     parent::__construct($resource);
 }
Esempio n. 9
0
 /**
  * PhpInputStream constructor.
  *
  * @param string $stream
  * @param string $mode
  */
 public function __construct($stream = 'php://input', $mode = 'r')
 {
     parent::__construct($stream, $mode);
 }
Esempio n. 10
0
 public function __construct()
 {
     $this->path = sys_get_temp_dir() . '/' . uniqid(time() . '_');
     $this->handle = fopen($this->path, 'w');
     parent::__construct($this->handle);
 }
Esempio n. 11
0
 /**
  * @param string $string String to write in the stream
  */
 public function __construct($string = '')
 {
     parent::__construct(fopen('php://temp', 'w+'));
     '' === $string or $this->write($string);
 }
Esempio n. 12
0
 public function __construct()
 {
     parent::__construct(fopen('php://input', 'r'));
 }
Esempio n. 13
0
 /**
  *
  * @param string $data Initial data
  * @param string $mode Open mode
  */
 public function __construct($data = null, $mode = 'r+')
 {
     $stream = Stream::open('php://temp', $mode, false);
     parent::__construct($stream);
     $this->write($data);
 }
 public function __construct($handle = null)
 {
     parent::__construct($handle);
     $this->current_content = '';
 }
Esempio n. 15
0
 /**
  * Default aggregate helper
  * @param mixed $stream
  */
 function __construct($stream = null)
 {
     parent::__construct($stream);
 }
 /**
  * @param  string|resource $stream
  */
 public function __construct($stream = 'php://input')
 {
     parent::__construct($stream, 'r');
 }
Esempio n. 17
0
 /**
  * 
  */
 public function __construct()
 {
     $stream = \defined('\\STDERR') ? \STDERR : Stream::open('php://stderr', 'w', false);
     parent::__construct($stream);
 }
Esempio n. 18
0
 /**
  * 
  */
 public function __construct()
 {
     $stream = \defined('\\STDIN') ? \STDIN : Stream::open('php://stdin', 'r', false);
     parent::__construct($stream);
 }