public function create($friendlyName, $options = array()) {
        $options = new Values($options);

        $data = Values::of(array(
            'FriendlyName' => $friendlyName,
            'ActivitySid' => $options['activitySid'],
            'Attributes' => $options['attributes'],
        ));

        $payload = $this->version->create(
            'POST',
            $this->uri,
            array(),
            $data
        );

        return new WorkerInstance($this->version, $payload, $this->solution['workspaceSid']);
    }
public function create($friendlyName, $options = array()) {
        $options = new Values($options);

        $data = Values::of(array(
            'FriendlyName' => $friendlyName,
            'ActivitySid' => $options['activitySid'],
            'Attributes' => $options['attributes'],
        ));

        $payload = $this->version->create(
            'POST',
            $this->uri,
            array(),
            $data
        );

        return new WorkerInstance($this->version, $payload, $this->solution['workspaceSid']);
    }
public function create ( $ friendlyName , $ options = array ( ) ) { $ options = new Values ( $ options ) ; $ data = Values :: of ( array ( 'FriendlyName' => $ friendlyName , 'ActivitySid' => $ options [ 'activitySid' ] , 'Attributes' => $ options [ 'attributes' ] , ) ) ; $ payload = $ this -> version -> create ( 'POST' , $ this -> uri , array ( ) , $ data ) ; return new WorkerInstance ( $ this -> version , $ payload , $ this -> solution [ 'workspaceSid' ] ) ; }
Create a new WorkerInstance

@param string $friendlyName String representing user-friendly name for the
Worker.
@param array|Options $options Optional Arguments
@return WorkerInstance Newly created WorkerInstance
@throws TwilioException When an HTTP error occurs.
Create a new WorkerInstance