photos/tests/stub.phpstub

660 lines
15 KiB
Plaintext

<?php
declare(strict_types=1);
/**
* @copyright Copyright (c) 2021 Robin Appelman <robin@icewind.nl>
*
* @license GNU AGPL version 3 or any later version
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
namespace {
use OCP\IServerContainer;
class OC {
static $CLI = false;
/** @var IServerContainer */
static $server;
}
}
namespace OC\Files\Node {
use OCP\Files\FileInfo;
abstract class Node implements \OCP\Files\Node {
/** @return FileInfo|\ArrayAccess */
public function getFileInfo() {}
/** @return \OCP\Files\Mount\IMountPoint */
public function getMountPoint() {}
}
}
namespace OC\Hooks {
class Emitter {
public function emit(string $class, string $value, array $option) {}
/** Closure $closure */
public function listen(string $class, string $value, $closure) {}
}
class BasicEmitter extends Emitter {
}
}
namespace OC\Cache {
class CappedMemoryCache {
public function get($key) {}
public function set($key, $value, $ttl = '') {}
}
}
namespace OC\Core\Command {
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
class Base {
public const OUTPUT_FORMAT_PLAIN = 'plain';
public const OUTPUT_FORMAT_JSON = 'json';
public const OUTPUT_FORMAT_JSON_PRETTY = 'json_pretty';
public function __construct() {}
protected function configure() {}
public function run(InputInterface $input, OutputInterface $output) {}
public function setName(string $name) {}
public function getHelper(string $name) {}
protected function writeArrayInOutputFormat(InputInterface $input, OutputInterface $output, $items, $prefix = ' - ') {
}
}
}
namespace OC\Files\ObjectStore {
class NoopScanner {}
}
namespace Symfony\Component\Console\Helper {
use Symfony\Component\Console\Output\OutputInterface;
class Table {
public function __construct(OutputInterface $text) {}
public function setHeaders(array $header) {}
public function setRows(array $rows) {}
public function render() {}
}
}
namespace Symfony\Component\Console\Input {
class InputInterface {
public function getOption(string $key) {}
public function getArgument(string $key) {}
}
class InputArgument {
const REQUIRED = 0;
const OPTIONAL = 1;
const IS_ARRAY = 1;
}
class InputOption {
const VALUE_NONE = 1;
const VALUE_REQUIRED = 1;
}
}
namespace Symfony\Component\Console\Question {
class ConfirmationQuestion {
public function __construct(string $text, bool $default) {}
}
}
namespace Symfony\Component\Console\Output {
class OutputInterface {
public const VERBOSITY_VERBOSE = 1;
public function write($messages, $newline = false, $options = 0);
public function writeln(string $text, int $flat = 0) {}
}
}
namespace OC\Files\Cache {
use OCP\Files\Cache\ICache;
use OCP\Files\Cache\ICacheEntry;
use OCP\Files\Search\ISearchQuery;
use OCP\Files\Search\ISearchOperator;
use OCP\Files\Search\ISearchQuery;
use OCP\Files\IMimeTypeLoader;
class Cache implements ICache {
/**
* @param \OCP\Files\Cache\ICache $cache
*/
public function __construct($cache) {
$this->cache = $cache;
}
public function getNumericStorageId() { }
public function get() { }
public function getIncomplete() {}
public function getPathById($id) {}
public function getAll() {}
public function get($file) {}
public function getFolderContents($folder) {}
public function getFolderContentsById($fileId) {}
public function put($file, array $data) {}
public function insert($file, array $data) {}
public function update($id, array $data) {}
public function getId($file) {}
public function getParentId($file) {}
public function inCache($file) {}
public function remove($file) {}
public function move($source, $target) {}
public function moveFromCache(ICache $sourceCache, $sourcePath, $targetPath) {}
public function clear() {}
public function getStatus($file) {}
public function search($pattern) {}
public function searchByMime($mimetype) {}
public function searchQuery(ISearchQuery $query) {}
public function correctFolderSize($path, $data = null, $isBackgroundScan = false) {}
public function copyFromCache(ICache $sourceCache, ICacheEntry $sourceEntry, string $targetPath): int {}
public function normalize($path) {}
public function getQueryFilterForStorage(): ISearchOperator {}
public function getCacheEntryFromSearchResult(ICacheEntry $rawEntry): ?ICacheEntry {}
public static function cacheEntryFromData($data, IMimeTypeLoader $mimetypeLoader): ICacheEntry {}
}
}
namespace OC\Files\Cache\Wrapper {
use OC\Files\Cache\Cache;
class CacheWrapper extends Cache {}
}
namespace OC\Files {
use OCP\Files\Cache\ICacheEntry;
use OCP\Files\Mount\IMountPoint;
use OCP\IUser;
class Filesystem {
public static function addStorageWrapper(string $wrapperName, callable $wrapper, int $priority = 50) {
}
}
class FileInfo implements \OCP\Files\FileInfo {
/**
* @param string|boolean $path
* @param \OCP\Files\Storage\IStorage $storage
* @param string $internalPath
* @param array|ICacheEntry $data
* @param \OCP\Files\Mount\IMountPoint $mount
* @param \OCP\IUser|null $owner
*/
public function __construct($path, $storage, $internalPath, $data, $mount, $owner = null) {}
}
class View {
public function __construct(string $path) {}
public function unlink($path) {}
}
}
namespace OC\User {
use OCP\UserInterface;
use OCP\IUser;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
class User implements IUser {
public function __construct(string $uid, ?UserInterface $backend, EventDispatcherInterface $dispatcher, $emitter = null, IConfig $config = null, $urlGenerator = null) {}
}
}
namespace OCA\DAV\Upload {
use Sabre\DAV\File;
abstract class FutureFile extends File {}
}
namespace OCA\DAV\Connector\Sabre {
class Node {
public function getFileInfo(): \OCP\Files\FileInfo {}
}
}
namespace OC\BackgroundJob {
use OCP\BackgroundJob\IJob;
use OCP\BackgroundJob\IJobList;
use OCP\ILogger;
abstract class TimedJob implements IJob {
public function execute(IJobList $jobList, ILogger $logger = null) {
}
abstract protected function run($argument);
public function setId(int $id) {
}
public function setLastRun(int $lastRun) {
}
public function setArgument($argument) {
}
public function getId() {
}
public function getLastRun() {
}
public function getArgument() {
}
}
}
namespace OC\Files\Mount {
use OC\Files\Filesystem;
use OC\Files\Storage\Storage;
use OC\Files\Storage\StorageFactory;
use OCP\Files\Mount\IMountPoint;
class MountPoint implements IMountPoint {
/**
* @var \OC\Files\Storage\Storage $storage
*/
protected $storage = null;
protected $class;
protected $storageId;
protected $rootId = null;
/** @var int|null */
protected $mountId;
/**
* @param string|\OCP\Files\Storage\IStorage $storage
* @param string $mountpoint
* @param array $arguments (optional) configuration for the storage backend
* @param \OCP\Files\Storage\IStorageFactory $loader
* @param array $mountOptions mount specific options
* @param int|null $mountId
* @throws \Exception
*/
public function __construct($storage, $mountpoint, $arguments = null, $loader = null, $mountOptions = null, $mountId = null) {
throw new \Exception('stub');
}
/**
* get complete path to the mount point, relative to data/
*
* @return string
*/
public function getMountPoint() {
throw new \Exception('stub');
}
/**
* Sets the mount point path, relative to data/
*
* @param string $mountPoint new mount point
*/
public function setMountPoint($mountPoint) {
throw new \Exception('stub');
}
/**
* @return \OCP\Files\Storage\IStorage
*/
public function getStorage() {
throw new \Exception('stub');
}
/**
* @return string
*/
public function getStorageId() {
throw new \Exception('stub');
}
/**
* @return int
*/
public function getNumericStorageId() {
throw new \Exception('stub');
}
/**
* @param string $path
* @return string
*/
public function getInternalPath($path) {
throw new \Exception('stub');
}
/**
* @param callable $wrapper
*/
public function wrapStorage($wrapper) {
throw new \Exception('stub');
}
/**
* Get a mount option
*
* @param string $name Name of the mount option to get
* @param mixed $default Default value for the mount option
* @return mixed
*/
public function getOption($name, $default) {
throw new \Exception('stub');
}
/**
* Get all options for the mount
*
* @return array
*/
public function getOptions() {
throw new \Exception('stub');
}
/**
* @return int
*/
public function getStorageRootId() {
throw new \Exception('stub');
}
public function getMountId() {
throw new \Exception('stub');
}
public function getMountType() {
throw new \Exception('stub');
}
public function getMountProvider(): string {
throw new \Exception('stub');
}
}
}
namespace OC\Files\Storage\Wrapper{
use OCP\Files\Cache\ICache;
use OCP\Files\Cache\ICacheEntry;
use OCP\Files\Search\ISearchQuery;
use OCP\Files\Storage\IStorage;
class Wrapper implements IStorage {
public function __construct(array $parameters) {
}
public function getWrapperStorage(): ?IStorage {}
public function getId() {}
public function mkdir($path) {}
public function rmdir($path) {}
public function opendir($path) {
throw new \Exception('stub');
}
public function is_dir($path) {
throw new \Exception('stub');
}
public function is_file($path) {
throw new \Exception('stub');
}
public function stat($path) {
throw new \Exception('stub');
}
public function filetype($path) {
throw new \Exception('stub');
}
public function filesize($path) {
throw new \Exception('stub');
}
public function isCreatable($path) {
throw new \Exception('stub');
}
public function isReadable($path) {
throw new \Exception('stub');
}
public function isUpdatable($path) {
throw new \Exception('stub');
}
public function isDeletable($path) {
throw new \Exception('stub');
}
public function isSharable($path) {
throw new \Exception('stub');
}
public function getPermissions($path) {
throw new \Exception('stub');
}
public function file_exists($path) {
throw new \Exception('stub');
}
public function filemtime($path) {
throw new \Exception('stub');
}
public function file_get_contents($path) {
throw new \Exception('stub');
}
public function file_put_contents($path, $data) {
throw new \Exception('stub');
}
public function unlink($path) {
throw new \Exception('stub');
}
public function rename($path1, $path2) {
throw new \Exception('stub');
}
public function copy($path1, $path2) {
throw new \Exception('stub');
}
public function fopen($path, $mode) {
throw new \Exception('stub');
}
public function getMimeType($path) {
throw new \Exception('stub');
}
public function hash($type, $path, $raw = false) {
throw new \Exception('stub');
}
public function free_space($path) {
throw new \Exception('stub');
}
public function touch($path, $mtime = null) {
throw new \Exception('stub');
}
public function getLocalFile($path) {
throw new \Exception('stub');
}
public function hasUpdated($path, $time) {
throw new \Exception('stub');
}
public function getETag($path) {
throw new \Exception('stub');
}
public function isLocal() {
throw new \Exception('stub');
}
public function instanceOfStorage($class) {
throw new \Exception('stub');
}
public function getDirectDownload($path) {
throw new \Exception('stub');
}
public function verifyPath($path, $fileName) {
throw new \Exception('stub');
}
public function copyFromStorage(IStorage $sourceStorage, $sourceInternalPath, $targetInternalPath) {
throw new \Exception('stub');
}
public function moveFromStorage(IStorage $sourceStorage, $sourceInternalPath, $targetInternalPath) {
throw new \Exception('stub');
}
public function test() {
throw new \Exception('stub');
}
public function getAvailability() {
throw new \Exception('stub');
}
public function setAvailability($isAvailable) {
throw new \Exception('stub');
}
public function getOwner($path) {
throw new \Exception('stub');
}
public function getCache() {
throw new \Exception('stub');
}
public function getPropagator() {
throw new \Exception('stub');
}
public function getScanner() {
throw new \Exception('stub');
}
public function getUpdater() {
throw new \Exception('stub');
}
public function getWatcher() {
throw new \Exception('stub');
}
}
class Jail extends Wrapper {
public function getUnjailedPath(string $path): string {}
}
class Quota extends Wrapper {
public function getQuota() {}
}
class PermissionsMask extends Wrapper {
public function getQuota() {}
}
}
namespace OCA\DAV\Connector\Sabre {
class Node extends \Sabre\Dav\INode {
public function getNode(): \OCP\Files\Node { }
public function getId(): int {}
}
class File extends Node {}
class Directory extends Node {}
}
namespace OCA\DAV\Connector\Sabre\Exception {
class FileLocked extends \Exception {}
class Forbidden extends \Exception {}
}
namespace OCA\DAV\Upload {
class FutureFile extends \Sabre\Dav\INode {}
}
namespace Doctrine\DBAL\Exception {
class UniqueConstraintViolationException extends \Exception {}
}
namespace OC\Files\Mount;
/**
* Defines the mount point to be (re)moved by the user
*/
interface MoveableMount {
/**
* Move the mount point to $target
*
* @param string $target the target mount point
* @return bool
*/
public function moveMount($target);
/**
* Remove the mount points
*
* @return bool
*/
public function removeMount();
}
namespace OCA\Files\Event;
use OCP\EventDispatcher\Event;
class LoadSidebar extends Event {
}
namespace OCA\DAV\Events;
use OCP\EventDispatcher\Event;
use Sabre\DAV\Server;
/**
* @since 20.0.0
*/
class SabrePluginAuthInitEvent extends Event {
/** @var Server */
private $server;
/**
* @since 20.0.0
*/
public function __construct(Server $server);
/**
* @since 20.0.0
*/
public function getServer(): Server;
}