当前位置: 首页>>代码示例>>PHP>>正文


PHP Stream::__construct方法代码示例

本文整理汇总了PHP中Stream::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP Stream::__construct方法的具体用法?PHP Stream::__construct怎么用?PHP Stream::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Stream的用法示例。


在下文中一共展示了Stream::__construct方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: __construct

 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;
     }
 }
开发者ID:verrier,项目名称:phpdmp,代码行数:8,代码来源:SystemInfoStream.php

示例2: __construct

 /**
  * 
  * @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);
 }
开发者ID:northborndesign,项目名称:northborndesign.tundra,代码行数:13,代码来源:FileStream.php

示例3: __construct

 /**
  * 
  * @param string $hostname
  * @param int $port
  */
 public function __construct($hostname, $port = null)
 {
     if ($port === null) {
         $port = -1;
     }
     $resource = fsockopen($hostname, $port);
     parent::__construct($resource);
 }
开发者ID:northborndesign,项目名称:northborndesign.tundra,代码行数:13,代码来源:SocketStream.php

示例4:

 function __construct()
 {
     parent::__construct();
     $this->moudleId = -1;
     $this->id = -1;
     $this->isResult = -1;
     $this->headerIsReaded = false;
 }
开发者ID:49038554,项目名称:Buddy,代码行数:8,代码来源:Message.php

示例5: __construct

 /**
  *
  * @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);
 }
开发者ID:rafsalvioni,项目名称:zeus-stream,代码行数:19,代码来源:Memory.php

示例6: __construct

 /**
  * Wraps around the specified stream.
  * 
  * @param resource $stream The stream to wrap around.
  */
 public function __construct($stream)
 {
     parent::__construct($stream, true);
 }
开发者ID:pear2,项目名称:net_transmitter,代码行数:9,代码来源:NetworkStream.php

示例7: __construct

 /**
  * 
  */
 public function __construct()
 {
     $stream = Stream::open('php://output', 'w', false);
     parent::__construct($stream);
 }
开发者ID:rafsalvioni,项目名称:zeus-stream,代码行数:8,代码来源:Output.php

示例8: __construct

 public function __construct(string $content)
 {
     $resource = fopen('php://temp', 'r+');
     fwrite($resource, $content);
     parent::__construct($resource);
 }
开发者ID:innmind,项目名称:filesystem,代码行数:6,代码来源:StringStream.php

示例9: __construct

 /**
  * PhpInputStream constructor.
  *
  * @param string $stream
  * @param string $mode
  */
 public function __construct($stream = 'php://input', $mode = 'r')
 {
     parent::__construct($stream, $mode);
 }
开发者ID:JanHuang,项目名称:http,代码行数:10,代码来源:PhpInputStream.php

示例10: __construct

 public function __construct()
 {
     $this->path = sys_get_temp_dir() . '/' . uniqid(time() . '_');
     $this->handle = fopen($this->path, 'w');
     parent::__construct($this->handle);
 }
开发者ID:core-12,项目名称:php-m3u8,代码行数:6,代码来源:File.php

示例11: __construct

 /**
  * @param string $string String to write in the stream
  */
 public function __construct($string = '')
 {
     parent::__construct(fopen('php://temp', 'w+'));
     '' === $string or $this->write($string);
 }
开发者ID:elegantweb,项目名称:framework,代码行数:8,代码来源:PhpTempStream.php

示例12: __construct

 public function __construct()
 {
     parent::__construct(fopen('php://input', 'r'));
 }
开发者ID:elegantweb,项目名称:framework,代码行数:4,代码来源:PhpInputStream.php

示例13: __construct

 /**
  *
  * @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);
 }
开发者ID:rafsalvioni,项目名称:zeus-stream,代码行数:11,代码来源:TempFile.php

示例14: __construct

 public function __construct($handle = null)
 {
     parent::__construct($handle);
     $this->current_content = '';
 }
开发者ID:MrYogi,项目名称:hasoffers-promotional-platform,代码行数:5,代码来源:Filter.php

示例15:

 /**
  * Default aggregate helper
  * @param mixed $stream
  */
 function __construct($stream = null)
 {
     parent::__construct($stream);
 }
开发者ID:jgswift,项目名称:detectr,代码行数:8,代码来源:Aggregate.php


注:本文中的Stream::__construct方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。