Skip to content

cybercog/yii2-soap-server-1

 
 

Repository files navigation

SOAP Server Extension for Yii 2

Note, PHP SOAP extension is required.

Build Status

Installation

The preferred way to install this extension is through composer.

Either run

composer require --prefer-dist mongosoft/yii2-soap-server "*"

or add

"mongosoft/yii2-soap-server": "*"

to the require section of your composer.json file.

Usage

You need to add [[mongosoft\soapserver\Action]] to web controller.

Note, In a service class, a remote invokable method must be a public method with a doc comment block containing the '@soap' tag.

class ApiController extends Controller
{
    /**
     * @inheritdoc
     */
    public function actions()
    {
        return [
            'hello' => 'mongosoft\soapserver\Action',
        ];
    }

    /**
     * @param string $name
     * @return string
     * @soap
     */
    public function getHello($name)
    {
        return 'Hello ' . $name;
    }
}

About

SOAP Server Extension for Yii 2

Resources

Stars

Watchers

Forks

Sponsor this project

Packages

No packages published

Languages

  • PHP 100.0%