mirror of
https://github.com/symfony/recipes-contrib.git
synced 2026-09-21 12:26:30 +03:00
Merge pull request #1030
This commit is contained in:
@@ -0,0 +1,66 @@
|
||||
<?php
|
||||
|
||||
namespace App\Document;
|
||||
|
||||
class Config
|
||||
{
|
||||
/**
|
||||
* 标题
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public static function getTitle()
|
||||
{
|
||||
return '演示';
|
||||
}
|
||||
|
||||
/**
|
||||
* 出版商
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getPublishing()
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
/**
|
||||
* 说明
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getExplain()
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
/**
|
||||
* 注意
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getNote()
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
/**
|
||||
* 附录
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getAppendix()
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
/**
|
||||
* 主机
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function getHost()
|
||||
{
|
||||
return $_ENV['DOC_HOST'];
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
namespace App\Document;
|
||||
|
||||
use PHPZlc\Document\Document;
|
||||
|
||||
class DemoDocument extends Document
|
||||
{
|
||||
public function demoAction()
|
||||
{
|
||||
$this->add()
|
||||
->setTitle('演示接口')
|
||||
->setUrl('/demo')
|
||||
->setReturnType('html')
|
||||
->setReturn('演示接口')
|
||||
->generate();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"bundles": {
|
||||
"PHPZlc\\Document\\DocumentBundle\\DocumentBundle": ["all"]
|
||||
},
|
||||
"copy-from-package": {
|
||||
"src/DocumentBundle/phpzlc-document.yaml": "config/packages/phpzlc-document.yaml"
|
||||
},
|
||||
"copy-from-recipe": {
|
||||
"Document/":"src/Document/"
|
||||
},
|
||||
"env": {
|
||||
"DOC_HOST": "http://dome-api.com"
|
||||
},
|
||||
"gitignore": [
|
||||
"public/apidoc/"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"bundles": {
|
||||
"PHPZlc\\PHPZlc\\Bundle\\PHPZlcBundle": ["all"]
|
||||
},
|
||||
"copy-from-package": {
|
||||
"Doctrine/ORM/Rewrite/Templates/Repository.tpl.php": "vendor/symfony/maker-bundle/src/Resources/skeleton/doctrine/Repository.tpl.php",
|
||||
"Doctrine/ORM/Rewrite/Hydration/ObjectHydrator.php": "vendor/doctrine/orm/lib/Doctrine/ORM/Internal/Hydration/ObjectHydrator.php",
|
||||
"Doctrine/ORM/Rewrite/MakeEntityRegenerate/ClassSourceManipulator.php": "vendor/symfony/maker-bundle/src/Util/ClassSourceManipulator.php",
|
||||
"Doctrine/ORM/Rewrite/MakeEntityRegenerate/EntityRegenerator.php": "vendor/symfony/maker-bundle/src/Doctrine/EntityRegenerator.php",
|
||||
"Bundle/phpzlc.yaml": "config/packages/phpzlc.yaml",
|
||||
"PROJECT_README.md":"README.md"
|
||||
},
|
||||
"copy-from-recipe": {
|
||||
"Business/":"src/Business/"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user