Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Generated on May 19, 2024 via composer

nette/utils v4.0.4

πŸ›  Nette Utils: lightweight utilities for string & array manipulation, image handling, safe JSON encoding/decoding, validation, slug or strong password generating etc.
Package summary
Share
1
issue
1
high severity
license
1
1
license
1
(BSD-3-Clause OR GPL-2.0-only OR GPL-3.0-only)
Package created
20 Mar 2014
Version published
17 Jan 2024
Maintainers
1
Total deps
1
Direct deps
0
License
BSD-3-Clause OR GPL-2.0-only OR GPL-3.0-only

Issues

1

1 high severity issue

high
Recommendation: Validate that the license expression complies with your license policy
via: nette/utils@v4.0.4
Collapse
Expand

Licenses

(BSD-3-Clause OR GPL-2.0-only OR GPL-3.0-only)

Expression
1 Packages, Including:
nette/utils@v4.0.4
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

0
All Dependencies CSV
β“˜ This is a list of nette/utils 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities

Visualizations

Frequently Asked Questions

What does nette/utils do?

Nette/Utils is a lightweight PHP utility package that provides a set of useful classes for everyday use in application development. It offers a variety of functions, including string and array manipulation, image handling, safe JSON encoding and decoding, validation, and slug or strong password generation. This composer package enhances efficiency in PHP development by saving from writing common code from scratch.

How do you use nette/utils?

In order to use the Nette/Utils package, you need to install it using Composer, a tool for dependency management in PHP. You can install the package by running the command composer require nette/utils in your terminal or command prompt.

Depending on your PHP version, you will need different versions of Nette Utils. For instance:

  • Nette Utils 4.0 is compatible with PHP 8.0 to 8.3
  • Nette Utils 3.2 is compatible with PHP 7.2 to 8.3
  • Nette Utils 3.1 and 3.0 are compatible with PHP 7.1 to 8.0
  • Nette Utils 2.5 is compatible with PHP 5.6 to 8.0

After successful installation, you can then reference and use the different classes and methods provided by Nette/Utils in your PHP scripts. For example, to use the string utility for generating slugs, you'd do:

<?php

use Nette\Utils\Strings;

$slug = Strings::webalize('Example String');
// output: example-string

To validate an email address, you can use Nette\Utils\Validators:

<?php

use Nette\Utils\Validators;

if (Validators::isEmail('example@email.com')) {
    echo 'Valid Email';
} else {
    echo 'Invalid Email';
}

Please note that the two code snippets above are just examples on some of the functionalities that Nette Utils provides.

Where are the nette/utils docs?

The documentation for Nette/Utils can be found at https://doc.nette.org/utils. This comprehensive resource offers information on everything from installation to usage of the various classes and methods included in the package. It covers topics like array handling, PHP callbacks, manipulation of dates and times, file operations, HTML generation, image processing, JSON encoding/decoding, random string generation, pagination, PHP reflection, string operations, object enhancements, validation, and PHP data types.