PluginProbe ʕ •ᴥ•ʔ
پارسی دیت – Parsi Date / 6.2.1
پارسی دیت – Parsi Date v6.2.1
6.2.1 6.2 6.1 5.1.6 5.1.7 5.1.8 5.1.8.2 6.0 trunk 1.0 1.1 1.2 1.3 1.3.1 1.3.2 1.3.3 1.3.4 1.3.5 2.0.0-alpha 2.1 2.1.1 2.1.2 2.1.3 2.1.5 2.1.6 2.1.7 2.2.0 2.2.1 2.2.2 2.2.3 2.3.0.1 2.3.0.2 2.3.1 2.3.2 2.3.3 2.3.4 3.0.1 3.0.2 3.0.3 4.0.0 4.0.1 4.0.2 5.1.0 5.1.1 5.1.2 5.1.3 5.1.4 5.1.5
wp-parsidate / vendor / symfony / polyfill-php81 / Resources / stubs / CURLStringFile.php
wp-parsidate / vendor / symfony / polyfill-php81 / Resources / stubs Last commit date
CURLStringFile.php 1 month ago ReturnTypeWillChange.php 1 month ago
CURLStringFile.php
52 lines
1 <?php
2
3 /*
4 * This file is part of the Symfony package.
5 *
6 * (c) Fabien Potencier <fabien@symfony.com>
7 *
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
10 */
11
12 if (\PHP_VERSION_ID >= 70400 && extension_loaded('curl')) {
13 /**
14 * @property string $data
15 */
16 class CURLStringFile extends CURLFile
17 {
18 private $data;
19
20 public function __construct(string $data, string $postname, string $mime = 'application/octet-stream')
21 {
22 $this->data = $data;
23 parent::__construct('data://application/octet-stream;base64,'.base64_encode($data), $mime, $postname);
24 }
25
26 public function __set(string $name, $value): void
27 {
28 if ('data' !== $name) {
29 $this->$name = $value;
30
31 return;
32 }
33
34 if (is_object($value) ? !method_exists($value, '__toString') : !is_scalar($value)) {
35 throw new TypeError('Cannot assign '.gettype($value).' to property CURLStringFile::$data of type string');
36 }
37
38 $this->name = 'data://application/octet-stream;base64,'.base64_encode($value);
39 }
40
41 public function __isset(string $name): bool
42 {
43 return isset($this->$name);
44 }
45
46 public function &__get(string $name)
47 {
48 return $this->$name;
49 }
50 }
51 }
52