Nette

Nette is an open-source PHP framework for building web applications. It offers a range of tools and libraries that help developers create secure, efficient, and maintainable web projects. Nette emphasizes simplicity, flexibility, and performance, providing features like an MVC architecture (Model-View-Controller), a template engine, and powerful database integration. It also includes built-in security measures, such as protection against SQL injection, XSS, and CSRF attacks, making it suitable for developing secure applications. Nette is particularly useful for developers seeking a lightweight, fast, and customizable framework to create modern web applications while minimizing the need for complex configurations.

Prerequisites

Create an account at seven.io and copy an API key from your developer dashboard.

If you are using the default HTTP client, you need to install and register the guzzlette extension.

Installation

extensions:
	guzzle: Contributte\Guzzlette\DI\GuzzleExtension # optional for the default HTTP client
	seven: Seven\Nette\DI\SevenExtension

seven:
	apiKey: YOUR_API_KEY # required
	httpClient: # optional

Usage

We have prepared the following clients to cover the most commonly used endpoints:

  • SmsClient
  • BalanceClient
  • VoiceClient

BalanceClient

  • get() - Retrieve account balance

SmsClient

  • send(Seven\Nette\Entity\SmsMessage) - Send SMS
  • test(Seven\Nette\Entity\SmsMessage) - Create test message without sending
  • status(string $id) - Retrieve SMS status

VoiceClient - for text-to-speech calls

VoiceClient is a service that allows converting text messages into speech and sending them as a call. This is particularly useful for automated notifications or reminders.

  1. 1

    Send message

    Use the method send(Seven\Nette\Entity\VoiceMessage) for sending text-to-speech messages.

  2. 2

    Test message

    Use the method test(Seven\Nette\Entity\VoiceMessage) for creating a message without sending it. This is helpful to check the message in advance.

Last updated: 5 days ago