[ticket/15305] Update PHPDoc

PHPBB3-15305
This commit is contained in:
Rubén Calvo 2017-08-07 12:05:58 +02:00
parent 8ffb14b305
commit dedd7648cd
2 changed files with 44 additions and 24 deletions

View file

@ -28,8 +28,9 @@ interface adapter_interface
* @param string path The file to be written to.
* @param string content The data to write into the file.
*
* @throws \phpbb\storage\exception\exception When the file already exists
* When the file cannot be written
* @throws \phpbb\storage\exception\exception When the file already exists
* When the file cannot be written
* @throws \phpbb\storage\exception\not_implemented When the adapter doesnt implement the method
*/
public function put_contents($path, $content);
@ -38,8 +39,10 @@ interface adapter_interface
*
* @param string $path The file to read
*
* @throws \phpbb\storage\exception\exception When the file dont exists
* When cannot read file contents
* @throws \phpbb\storage\exception\exception When the file dont exists
* When cannot read file contents
* @throws \phpbb\storage\exception\not_implemented When the adapter doesnt implement the method
*
* @return string Returns file contents
*
*/
@ -50,6 +53,8 @@ interface adapter_interface
*
* @param string $path file/directory to check
*
* @throws \phpbb\storage\exception\not_implemented When the adapter doesnt implement the method
*
* @return bool Returns true if all files/directories exist, false otherwise
*/
public function exists($path);
@ -59,7 +64,8 @@ interface adapter_interface
*
* @param string $path file/directory to remove
*
* @throws \phpbb\storage\exception\exception When removal fails.
* @throws \phpbb\storage\exception\exception When removal fails.
* @throws \phpbb\storage\exception\not_implemented When the adapter doesnt implement the method
*/
public function delete($path);
@ -69,8 +75,9 @@ interface adapter_interface
* @param string $path_orig The original file/direcotry
* @param string $path_dest The target file/directory
*
* @throws \phpbb\storage\exception\exception When target exists
* When file/directory cannot be renamed
* @throws \phpbb\storage\exception\exception When target exists
* When file/directory cannot be renamed
* @throws \phpbb\storage\exception\not_implemented When the adapter doesnt implement the method
*/
public function rename($path_orig, $path_dest);
@ -80,8 +87,9 @@ interface adapter_interface
* @param string $path_orig The original filename
* @param string $path_dest The target filename
*
* @throws \phpbb\storage\exception\exception When target exists
* When the file cannot be copied
* @throws \phpbb\storage\exception\exception When target exists
* When the file cannot be copied
* @throws \phpbb\storage\exception\not_implemented When the adapter doesnt implement the method
*/
public function copy($path_orig, $path_dest);
@ -90,7 +98,8 @@ interface adapter_interface
*
* @param string $path File to read
*
* @throws \phpbb\storage\exception\exception When cannot open file
* @throws \phpbb\storage\exception\exception When cannot open file
* @throws \phpbb\storage\exception\not_implemented When the adapter doesnt implement the method
*
* @return resource Returns a file pointer
*/
@ -102,8 +111,9 @@ interface adapter_interface
* @param string $path The target file
* @param resource $resource The resource
*
* @throws \phpbb\storage\exception\exception When target file exists
* When target file cannot be created
* @throws \phpbb\storage\exception\exception When target file exists
* When target file cannot be created
* @throws \phpbb\storage\exception\not_implemented When the adapter doesnt implement the method
*/
public function write_stream($path, $resource);
}

View file

@ -66,8 +66,9 @@ class storage
* @param string path The file to be written to.
* @param string content The data to write into the file.
*
* @throws \phpbb\storage\exception\exception When the file already exists
* When the file cannot be written
* @throws \phpbb\storage\exception\exception When the file already exists
* When the file cannot be written
* @throws \phpbb\storage\exception\not_implemented When the adapter doesnt implement the method
*/
public function put_contents($path, $content)
{
@ -79,8 +80,10 @@ class storage
*
* @param string $path The file to read
*
* @throws \phpbb\storage\exception\exception When the file dont exists
* When cannot read file contents
* @throws \phpbb\storage\exception\exception When the file dont exists
* When cannot read file contents
* @throws \phpbb\storage\exception\not_implemented When the adapter doesnt implement the method
*
* @return string Returns file contents
*
*/
@ -94,6 +97,8 @@ class storage
*
* @param string $path file/directory to check
*
* @throws \phpbb\storage\exception\not_implemented When the adapter doesnt implement the method
*
* @return bool Returns true if all files/directories exist, false otherwise
*/
public function exists($path)
@ -106,7 +111,8 @@ class storage
*
* @param string $path file/directory to remove
*
* @throws \phpbb\storage\exception\exception When removal fails.
* @throws \phpbb\storage\exception\exception When removal fails.
* @throws \phpbb\storage\exception\not_implemented When the adapter doesnt implement the method
*/
public function delete($path)
{
@ -119,8 +125,9 @@ class storage
* @param string $path_orig The original file/direcotry
* @param string $path_dest The target file/directory
*
* @throws \phpbb\storage\exception\exception When target exists
* When file/directory cannot be renamed
* @throws \phpbb\storage\exception\exception When target exists
* When file/directory cannot be renamed
* @throws \phpbb\storage\exception\not_implemented When the adapter doesnt implement the method
*/
public function rename($path_orig, $path_dest)
{
@ -133,8 +140,9 @@ class storage
* @param string $path_orig The original filename
* @param string $path_dest The target filename
*
* @throws \phpbb\storage\exception\exception When target exists
* When the file cannot be copied
* @throws \phpbb\storage\exception\exception When target exists
* When the file cannot be copied
* @throws \phpbb\storage\exception\not_implemented When the adapter doesnt implement the method
*/
public function copy($path_orig, $path_dest)
{
@ -146,7 +154,8 @@ class storage
*
* @param string $path File to read
*
* @throws \phpbb\storage\exception\exception When cannot open file
* @throws \phpbb\storage\exception\exception When cannot open file
* @throws \phpbb\storage\exception\not_implemented When the adapter doesnt implement the method
*
* @return resource Returns a file pointer
*/
@ -161,8 +170,9 @@ class storage
* @param string $path The target file
* @param resource $resource The resource
*
* @throws \phpbb\storage\exception\exception When target file exists
* When target file cannot be created
* @throws \phpbb\storage\exception\exception When target file exists
* When target file cannot be created
* @throws \phpbb\storage\exception\not_implemented When the adapter doesnt implement the method
*/
public function write_stream($path, $resource)
{