コード例 #1
0
ファイル: UtilsTest.php プロジェクト: hexcode007/yfcms
 public function testCopiesToStringStopsWhenReadFails()
 {
     $s1 = Stream::factory('foobaz');
     $s1 = FnStream::decorate($s1, ['read' => function () {
         return false;
     }]);
     $result = Utils::copyToString($s1);
     $this->assertEquals('', $result);
 }
コード例 #2
0
ファイル: AppendStream.php プロジェクト: hexcode007/yfcms
 public function getContents()
 {
     return Utils::copyToString($this);
 }
コード例 #3
0
ファイル: PumpStream.php プロジェクト: hexcode007/yfcms
 public function __toString()
 {
     return Utils::copyToString($this);
 }
コード例 #4
0
 public function getContents($maxLength = -1)
 {
     return Utils::copyToString($this, $maxLength);
 }