用于创建API的TYPO3 Flow包

安装: 9

依赖项: 0

建议者: 0

安全: 0

星星: 0

关注者: 2

分支: 0

开放问题: 0

类型:typo3-flow-framework

1.0 2016-02-10 21:36 UTC

This package is not auto-updated.

Last update: 2024-09-14 18:53:01 UTC


README

是一个TYPO3.Flow包,用于为现有代码创建API

示例路由

通过REST查找所有TYPO3\Flow\Security\Role

Routes.yaml

-
  name: 'Rest route for Roles'
  uriPattern: role
  httpMethods:
    - GET
  defaults:
    '@package': PerfectIn.Api
    '@controller': Rest
    '@action': handle
    class: TYPO3\Flow\Security\Policy\PolicyService
    method: getRoles
 

通过REST查找一个TYPO3\Flow\Security\Role

注意,URL中的变量{roleIdentifier}会自动映射到getRole方法中的参数$roleIdentifier

Routes.yaml

-
  name: 'Rest route for Role'
  uriPattern: 'role/{roleIdentifier}'
  httpMethods:
    - GET
  defaults:
    '@package': PerfectIn.Api
    '@controller': Rest
    '@action': handle
    class: TYPO3\Flow\Security\Policy\PolicyService
    method: getRole