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); }
function __construct() { parent::__construct(); $this->moudleId = -1; $this->id = -1; $this->isResult = -1; $this->headerIsReaded = false; }
/** * * @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); }
/** * Wraps around the specified stream. * * @param resource $stream The stream to wrap around. */ public function __construct($stream) { parent::__construct($stream, true); }
/** * */ public function __construct() { $stream = Stream::open('php://output', 'w', false); parent::__construct($stream); }
public function __construct(string $content) { $resource = fopen('php://temp', 'r+'); fwrite($resource, $content); parent::__construct($resource); }
/** * PhpInputStream constructor. * * @param string $stream * @param string $mode */ public function __construct($stream = 'php://input', $mode = 'r') { parent::__construct($stream, $mode); }
public function __construct() { $this->path = sys_get_temp_dir() . '/' . uniqid(time() . '_'); $this->handle = fopen($this->path, 'w'); parent::__construct($this->handle); }
/** * @param string $string String to write in the stream */ public function __construct($string = '') { parent::__construct(fopen('php://temp', 'w+')); '' === $string or $this->write($string); }
public function __construct() { parent::__construct(fopen('php://input', 'r')); }
/** * * @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 = ''; }
/** * 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'); }
/** * */ public function __construct() { $stream = \defined('\\STDERR') ? \STDERR : Stream::open('php://stderr', 'w', false); parent::__construct($stream); }
/** * */ public function __construct() { $stream = \defined('\\STDIN') ? \STDIN : Stream::open('php://stdin', 'r', false); parent::__construct($stream); }