1 | <?php |
||
10 | class Kohana_Upload_Temp |
||
11 | { |
||
12 | 24 | public static function factory() |
|
13 | { |
||
14 | 24 | return new Upload_Temp; |
|
15 | } |
||
16 | |||
17 | 19 | public static function config($name = NULL) |
|
18 | { |
||
19 | 19 | if ($name !== NULL) |
|
20 | { |
||
21 | 19 | return Kohana::$config->load("jam.upload.temp.{$name}"); |
|
22 | } |
||
23 | else |
||
24 | { |
||
25 | return Kohana::$config->load("jam.upload.temp"); |
||
26 | } |
||
27 | } |
||
28 | |||
29 | public static function valid($file) |
||
33 | |||
34 | protected $_directory; |
||
35 | |||
36 | 22 | public function directory($directory = NULL) |
|
37 | { |
||
38 | 22 | if ($directory !== NULL) |
|
39 | { |
||
40 | 5 | $this->_directory = $directory; |
|
41 | 5 | return $this; |
|
42 | } |
||
43 | |||
44 | 22 | if ( ! $this->_directory) |
|
45 | { |
||
46 | 17 | $this->_directory = uniqid(); |
|
47 | } |
||
48 | |||
49 | 22 | return $this->_directory; |
|
50 | } |
||
51 | |||
52 | 15 | public function directory_path($thumbnail = NULL) |
|
53 | { |
||
54 | 15 | $directory = $this->realpath($this->directory(), $thumbnail); |
|
55 | |||
56 | 15 | if ( ! is_dir($directory)) |
|
57 | { |
||
58 | 15 | mkdir($directory, 0777); |
|
59 | } |
||
60 | |||
61 | 15 | return $directory; |
|
62 | } |
||
63 | |||
64 | public function directory_url($thumbnail = NULL) |
||
68 | |||
69 | 19 | public function clear() |
|
70 | { |
||
71 | 19 | if ($this->_directory) |
|
72 | { |
||
73 | 17 | Upload_Util::rmdir($this->realpath($this->directory())); |
|
74 | 17 | $this->_directory = NULL; |
|
75 | } |
||
76 | 19 | } |
|
77 | |||
78 | 19 | public function realpath($path, $thumbnail = NULL) |
|
82 | |||
83 | public function url($path, $thumbnail = NULL) |
||
87 | |||
88 | } |
||
89 |
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.
This is most likely a typographical error or the method has been renamed.