52 lines
1.1 KiB
PHP
52 lines
1.1 KiB
PHP
|
|
<?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);
|
||
|
|
}
|