protected function createAccount($username, $password, $email, $options, $endpoint, $returnType)
    {
        $this->invokeApiPost($endpoint, array_merge($options, [
            'action' => 'create',
            'add' => 'Submit',
            'email' => $email,
            'passwd' => $password,
            'passwd2' => $password,
            'username' => $username,
        ]));
        return new $returnType($username, $this);
    }
protected function createAccount($username, $password, $email, $options, $endpoint, $returnType)
    {
        $this->invokeApiPost($endpoint, array_merge($options, [
            'action' => 'create',
            'add' => 'Submit',
            'email' => $email,
            'passwd' => $password,
            'passwd2' => $password,
            'username' => $username,
        ]));
        return new $returnType($username, $this);
    }
protected function createAccount ( $ username , $ password , $ email , $ options , $ endpoint , $ returnType ) { $ this -> invokeApiPost ( $ endpoint , array_merge ( $ options , [ 'action' => 'create' , 'add' => 'Submit' , 'email' => $ email , 'passwd' => $ password , 'passwd2' => $ password , 'username' => $ username , ] ) ) ; return new $ returnType ( $ username , $ this ) ; }
Internal helper function for creating new accounts.

@param string $username Login for the new user
@param string $password Password for the new user
@param string $email Email for the new user
@param array $options List of DA account options to apply
@param string $endpoint API endpoint to invoke
@param string $returnType Class name that should wrap the resulting account
@return object An instance of the type specified in $returnType
Internal helper function for creating new accounts .