for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
/*
* This file is part of the EasyWeChatComposer.
*
* (c) 张铭阳 <[email protected]>
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
*/
namespace EasyWeChatComposer\Delegation;
use EasyWeChatComposer\EasyWeChat;
class DelegationOptions
{
/**
* @var array
protected $config = [
'enabled' => false,
];
* @return $this
public function enable()
$this->config['enabled'] = true;
return $this;
}
public function disable()
$this->config['enabled'] = false;
* @param bool $ability
public function ability($ability)
$this->config['enabled'] = (bool) $ability;
* @param string $host
public function toHost($host)
$this->config['host'] = $host;
* Destructor.
public function __destruct()
EasyWeChat::mergeConfig([
'delegation' => $this->config,
]);