ChmpxSlave::__construct
Creates a ChmpxSlave instance
Description
public function __construct($handle, bool $no_giveup_rejoin = false) {}
Creates a ChmpxSlave instance.
Parameters
- filepath
- Specifies the chmpx configuration file path.
- is_auto_rejoin
- True if reconnect with a chmpx server/slave process automatically.
Examples
php -r '$handle = chmpxpx_create("./tests/slave.yaml", false, true); $slvobj = new ChmpxSlave($handle); chmpxpx_destroy($handle);'
The above example will output:
object(ChmpxSlave)#1 (2) {
["chmpx_handle"]=>
resource(4) of type (chmpx_handle)
["msgid_handle"]=>
resource(5) of type (msgid_handle)
}
See Also
- chmpxpx_create - Creates a chmpx handle
- chmpxpx_destroy - Destroys a chmpx handle