1: <?php
2:
3: namespace Guzzle\Http\Message;
4:
5: use Guzzle\Common\Exception\InvalidArgumentException;
6:
7: /**
8: * POST file upload
9: */
10: interface PostFileInterface
11: {
12: /**
13: * Set the name of the field
14: *
15: * @param string $name Field name
16: *
17: * @return self
18: */
19: public function setFieldName($name);
20:
21: /**
22: * Get the name of the field
23: *
24: * @return string
25: */
26: public function getFieldName();
27:
28: /**
29: * Set the path to the file
30: *
31: * @param string $path Full path to the file
32: *
33: * @return self
34: * @throws InvalidArgumentException if the file cannot be read
35: */
36: public function setFilename($path);
37:
38: /**
39: * Get the full path to the file
40: *
41: * @return string
42: */
43: public function getFilename();
44:
45: /**
46: * Set the Content-Type of the file
47: *
48: * @param string $type Content type
49: *
50: * @return self
51: */
52: public function setContentType($type);
53:
54: /**
55: * Get the Content-Type of the file
56: *
57: * @return string
58: */
59: public function getContentType();
60:
61: /**
62: * Get a cURL ready string or CurlFile object for the upload
63: *
64: * @return string
65: */
66: public function getCurlValue();
67: }
68: