Subversion Repositories php-qbpwcf

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
3 liveuser 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
     * Set the post name of the file
40
     *
41
     * @param string $name The new name of the file
42
     *
43
     * @return self
44
     */
45
    public function setPostname($name);
46
 
47
    /**
48
     * Get the full path to the file
49
     *
50
     * @return string
51
     */
52
    public function getFilename();
53
 
54
    /**
55
     * Get the post name of the file
56
     *
57
     * @return string
58
     */
59
    public function getPostname();
60
 
61
    /**
62
     * Set the Content-Type of the file
63
     *
64
     * @param string $type Content type
65
     *
66
     * @return self
67
     */
68
    public function setContentType($type);
69
 
70
    /**
71
     * Get the Content-Type of the file
72
     *
73
     * @return string
74
     */
75
    public function getContentType();
76
 
77
    /**
78
     * Get a cURL ready string or CurlFile object for the upload
79
     *
80
     * @return string
81
     */
82
    public function getCurlValue();
83
}