- md5
- 3f99a0bec65ad9976c79e795309357f2
- sha1
- 9c95cc14dd8141cc269ed67734f6cc7d96b9a5cb
- sha256
- 925b8a89b0c186d9eceab31b0905b60d48b41635d39c896290fb463040377720
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201
<?php
/**
* @package Joomla.Administrator
* @subpackage com_media
*
* @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
namespace Joomla\Component\Media\Administrator\Adapter;
defined('_JEXEC') or die;
/**
* Media file adapter interface.
*
* @since __DEPLOY_VERSION__
*/
interface AdapterInterface
{
/**
* Returns the requested file or folder. The returned object
* has the following properties available:
* - type: The type can be file or dir
* - name: The name of the file
* - path: The relative path to the root
* - extension: The file extension
* - size: The size of the file
* - create_date: The date created
* - modified_date: The date modified
* - mime_type: The mime type
* - width: The width, when available
* - height: The height, when available
*
* If the path doesn't exist a FileNotFoundException is thrown.
*
* @param string $path The path to the file or folder
*
* @return \stdClass
*
* @since __DEPLOY_VERSION__
* @throws \Exception
*/
public function getFile($path = '/');
/**
* Returns the folders and files for the given path. The returned objects
* have the following properties available:
* - type: The type can be file or dir
* - name: The name of the file
* - path: The relative path to the root
* - extension: The file extension
* - size: The size of the file
* - create_date: The date created
* - modified_date: The date modified
* - mime_type: The mime type
* - width: The width, when available
* - height: The height, when available
*
* If the path doesn't exist a FileNotFoundException is thrown.
*
* @param string $path The folder
*
* @return \stdClass[]
*
* @since __DEPLOY_VERSION__
* @throws \Exception
*/
public function getFiles($path = '/');
/**
* Creates a folder with the given name in the given path.
*
* @param string $name The name
* @param string $path The folder
*
* @return void
*
* @since __DEPLOY_VERSION__
* @throws \Exception
*/
public function createFolder($name, $path);
/**
* Creates a file with the given name in the given path with the data.
*
* @param string $name The name
* @param string $path The folder
* @param binary $data The data
*
* @return void
*
* @since __DEPLOY_VERSION__
* @throws \Exception
*/
public function createFile($name, $path, $data);
/**
* Updates the file with the given name in the given path with the data.
*
* @param string $name The name
* @param string $path The folder
* @param binary $data The data
*
* @return void
*
* @since __DEPLOY_VERSION__
* @throws \Exception
*/
public function updateFile($name, $path, $data);
/**
* Deletes the folder or file of the given path.
*
* @param string $path The path to the file or folder
*
* @return void
*
* @since __DEPLOY_VERSION__
* @throws \Exception
*/
public function delete($path);
/**
* Moves a file or folder from source to destination
*
* @param string $sourcePath The source path
* @param string $destinationPath The destination path
* @param bool $force Force to overwrite
*
* @return void
*
* @since __DEPLOY_VERSION__
* @throws \Exception
*/
public function move($sourcePath, $destinationPath, $force = false);
/**
* Copies a file or folder from source to destination
*
* @param string $sourcePath The source path
* @param string $destinationPath The destination path
* @param bool $force Force to overwrite
*
* @return void
*
* @since __DEPLOY_VERSION__
* @throws \Exception
*/
public function copy($sourcePath, $destinationPath, $force = false);
/**
* Returns a public url for the given path. This function can be used by the cloud
* adapter to publish the media file and create a permanent publicly accessible
* url.
*
* @param string $path The path to file
*
* @return string
*
* @since __DEPLOY_VERSION__
* @throws \Joomla\Component\Media\Administrator\Exception\FileNotFoundException
*/
public function getUrl($path);
/**
* Returns the name of the adapter.
* It will be shown in the Media Manager
*
* @return string
*
* @since __DEPLOY_VERSION__
*/
public function getAdapterName();
/**
* Search for a pattern in a given path
*
* @param string $path The base path for the search
* @param string $needle The path to file
* @param bool $recursive Do a recursive search
*
* @return \stdClass[]
*
* @since __DEPLOY_VERSION__
*/
public function search($path, $needle, $recursive);
/**
* Returns a temporary url for the given path.
* This is used internally in media manager
*
* @param string $path The path to file
*
* @return string
*
* @since __DEPLOY_VERSION__
* @throws \Joomla\Component\Media\Administrator\Exception\FileNotFoundException
*/
public function getTemporaryUrl($path);
}
No other release has this exact content. See every version of this file.