File tree 4 files changed +68
-34
lines changed
4 files changed +68
-34
lines changed Original file line number Diff line number Diff line change @@ -7,47 +7,20 @@ PHPExif serves as a wrapper around some native or CLI tools which access this EX
7
7
## Supported tools
8
8
9
9
* Native PHP functionality (exif_read_data, iptcparse)
10
- * [ Exiftool] ( http://www.sno.phy.queensu.ca/~phil/exiftool/ ) adapter (wrapper for the exiftool binary)
10
+ * [ Exiftool] ( http://www.sno.phy.queensu.ca/~phil/exiftool ) adapter (wrapper for the exiftool binary)
11
11
12
12
## Installation (composer)
13
13
14
14
``` json
15
- "miljar/php-exif" : " 0.* "
15
+ "miljar/php-exif" : " ~0.2 "
16
16
```
17
17
18
18
19
19
## Usage
20
20
21
- ### Using factory method
21
+ [ Before v0.2.2 ] ( Resources/doc/usage_0.2.1.md )
22
22
23
- ``` php
24
- <?php
25
- // reader with Native adapter
26
- $reader = \PHPExif\Reader::factory(\PHPExif\Reader::TYPE_NATIVE);
27
-
28
- // reader with Exiftool adapter
29
- //$reader = \PHPExif\Reader::factory(\PHPExif\Reader::TYPE_EXIFTOOL);
30
-
31
- $exif = $reader->read('/path/to/file');
32
-
33
- echo 'Title: ' . $exif->getTitle() . PHP_EOL;
34
- ```
35
-
36
- ### Using custom options
37
-
38
- ``` php
39
- <?php
40
- $adapter = new \PHPExif\Reader\Adapter\Exiftool(
41
- array(
42
- 'toolPath' => '/path/to/exiftool',
43
- )
44
- );
45
- $reader = new \PHPExif\Reader($adapter);
46
-
47
- $exif = $reader->read('/path/to/file');
48
-
49
- echo 'Title: ' . $exif->getTitle() . PHP_EOL;
50
- ```
23
+ [ v0.2.2+] ( Resources/doc/usage.md )
51
24
52
25
## Contributing
53
26
Original file line number Diff line number Diff line change
1
+ ## Usage ##
2
+
3
+ ### Using factory method
4
+
5
+ ``` php
6
+ <?php
7
+ // reader with Native adapter
8
+ $reader = \PHPExif\Reader\Reader::factory(\PHPExif\Reader\Reader::TYPE_NATIVE);
9
+
10
+ // reader with Exiftool adapter
11
+ //$reader = \PHPExif\Reader\Reader::factory(\PHPExif\Reader\Reader::TYPE_EXIFTOOL);
12
+
13
+ $exif = $reader->read('/path/to/file');
14
+
15
+ echo 'Title: ' . $exif->getTitle() . PHP_EOL;
16
+ ```
17
+
18
+ ### Using custom options
19
+
20
+ ``` php
21
+ <?php
22
+ $adapter = new \PHPExif\Adapter\Exiftool(
23
+ array(
24
+ 'toolPath' => '/path/to/exiftool',
25
+ )
26
+ );
27
+ $reader = new \PHPExif\Reader\Reader($adapter);
28
+
29
+ $exif = $reader->read('/path/to/file');
30
+
31
+ echo 'Title: ' . $exif->getTitle() . PHP_EOL;
32
+ ```
Original file line number Diff line number Diff line change
1
+ ## Usage ##
2
+
3
+ ### Using factory method
4
+
5
+ ``` php
6
+ <?php
7
+ // reader with Native adapter
8
+ $reader = \PHPExif\Reader::factory(\PHPExif\Reader::TYPE_NATIVE);
9
+
10
+ // reader with Exiftool adapter
11
+ //$reader = \PHPExif\Reader::factory(\PHPExif\Reader::TYPE_EXIFTOOL);
12
+
13
+ $exif = $reader->getExifFromFile('/path/to/file');
14
+
15
+ echo 'Title: ' . $exif->getTitle() . PHP_EOL;
16
+ ```
17
+
18
+ ### Using custom options
19
+
20
+ ``` php
21
+ <?php
22
+ $adapter = new \PHPExif\Reader\Adapter\Exiftool(
23
+ array(
24
+ 'toolPath' => '/path/to/exiftool',
25
+ )
26
+ );
27
+ $reader = new \PHPExif\Reader($adapter);
28
+
29
+ $exif = $reader->getExifFromFile('/path/to/file');
30
+
31
+ echo 'Title: ' . $exif->getTitle() . PHP_EOL;
32
+ ```
Original file line number Diff line number Diff line change @@ -71,9 +71,6 @@ public function getAdapter()
71
71
*/
72
72
public static function factory ($ type )
73
73
{
74
- /**
75
- * @var $result $this
76
- */
77
74
$ classname = get_called_class ();
78
75
$ adapter = null ;
79
76
switch ($ type ) {
You can’t perform that action at this time.
0 commit comments