@@ -19,9 +19,12 @@ public function __construct(\FFI\CData $pointer)
19
19
}
20
20
21
21
/**
22
- * Make a new source from a file descriptor (a small integer).
23
- * Make a new source that is attached to the descriptor. For example:
24
- * $source = VipsSource::newFromDescriptor(0)
22
+ * Make a new source from a file descriptor. For example:
23
+ *
24
+ * ```php
25
+ * $source = Source::newFromDescriptor(0);
26
+ * ```
27
+ *
25
28
* Makes a descriptor attached to stdin.
26
29
* You can pass this source to (for example) @see Image::newFromSource()
27
30
* @throws Exception
@@ -38,9 +41,12 @@ public static function newFromDescriptor(int $descriptor): self
38
41
}
39
42
40
43
/**
41
- * Make a new source from a filename.
42
- * Make a new source that is attached to the named file. For example:
43
- * $source = VipsSource::newFromFile("myfile.jpg")
44
+ * Make a new source from a filename. For example:
45
+ *
46
+ * ```php
47
+ * $source = Source::newFromFile("myfile.jpg");
48
+ * ```
49
+ *
44
50
* You can pass this source to (for example) @see Image::newFromSource()
45
51
* @throws Exception
46
52
*/
@@ -56,9 +62,12 @@ public static function newFromFile(string $filename): self
56
62
}
57
63
58
64
/**
59
- * Make a new source from a filename.
60
- * Make a new source that uses the provided $data. For example:
61
- * $source = VipsSource::newFromFile(file_get_contents("myfile.jpg"))
65
+ * Make a new source from a memory buffer. For example:
66
+ *
67
+ * ```php
68
+ * $source = Source::newFromMemory(file_get_contents("myfile.jpg"));
69
+ * ```
70
+ *
62
71
* You can pass this source to (for example) @see Image::newFromSource()
63
72
* @throws Exception
64
73
*/
0 commit comments