perfectin/webservice

TYPO3 Flow 用于创建 Web服务的包

安装: 13

依赖项: 0

建议者: 0

安全: 0

星标: 0

关注者: 2

分支: 0

开放问题: 0

类型:typo3-flow-framework

1.0.0 2016-02-10 20:40 UTC

This package is not auto-updated.

Last update: 2024-09-24 02:52:29 UTC


README

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

创建Web服务配置,您可以在其中定义需要作为Web服务提供的方法

  • 支持REST和SOAP

示例Web服务配置

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

webservices.yaml

-
  name: Roles
  operations:
    -
      name: findAll
      bindings:
        - 
          type: rest
          options:
            url: webservice/security/role
            method: GET
      implementation:
        class: TYPO3\Flow\Security\Policy\RoleRepository
        method: findAll 
 

通过REST找到单个TYPO3\Flow\Security\Roles

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

webservices.yaml

    -
      name: read
      bindings:
        - 
          type: rest
          options:
            url: webservice/security/role/{identifier}
            method: GET
      implementation:
        class: TYPO3\Flow\Security\Policy\RoleRepository
        method: findByIdentifier