Joywork/import/document/provider/DocProvider.php

52 lines
1.1 KiB
PHP
Raw Permalink Normal View History

2026-05-22 20:21:54 +02:00
<?php
interface DocProvider
{
/**
* @param DocTarget $target
* @param $id
* @return Document
* @throws DocNotFoundException
*/
public function getDirById(DocTarget $target, $id);
/**
* @param DocTarget $target
* @param $id
* @return Document
* @throws DocNotFoundException
*/
public function getFileById(DocTarget $target, $id);
/**
* @param DocTarget $target
* @param $id
* @return Document
* @throws DocNotFoundException
*/
public function getEntityById(DocTarget $target, $id);
/**
* @param DocTarget $target
* @param $id
* @return Document[]
*/
public function getChildren(DocTarget $target, $id);
/**
* @param DocTarget $target
* @param $name
* @param Document $parent
* @return Document
*/
public function createDir(DocTarget $target, $name, Document $parent=null);
/**
* @param DocTarget $target
* @param $name
* @param $file
* @param Document $parent
* @return Document
*/
public function createFile(DocTarget $target, $name, $file, Document $parent=null);
}