Download the PHP package vertigolabs/data-aware without Composer

On this page you can find all versions of the php package vertigolabs/data-aware. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package data-aware

VertigoLabs Data Aware

DataAware provides a unique and consistent method of dynamic data handling.

Dependencies

Features

Methods

setData($data, $normalize = true, $applyDefaults = true)

Set the data for the class. This method accepts three parameters:

Parameters:

$data: The data to be managed by the class. It is expected to be an array.

$normalize (optional): This is a boolean parameter that indicates whether the keys in the $data array should be normalized into camelCase format. The default value is true, which means the keys will be normalized by default unless specified otherwise.

$applyDefaults (optional): This is also a boolean parameter. If set to true, the method will apply default values for any keys in the $data array that aren't already set. The default value of this parameter is true.

This method sets the data for the class while considering the provided normalization and defaulting parameters.

mergeData($data, $normalize = true, $applyDefaults = true)

This method merges new data into the existing data set.

Parameters:

$data: The new data to merge into the existing data set. It should be an array.

$normalize (optional): This is a boolean parameter that dictates whether the keys in the $data array should be normalized into camelCase format. The default value is true, which means the keys will be normalized by default unless specified otherwise.

$applyDefaults (optional): This is also a boolean parameter. If set to true, the method will apply default values for any keys in the $data array that aren't already set. The default value of this parameter is also true.

Merges new data into the existing data set. This method accepts the same parameters as setData().

getData($key = null, $default = null)

Retrieve specific, all, or a subset of processed data. This method accepts one optional parameter:

Parameters:

$key (optional): This is a parameter that accepts the key for the specific piece of data you want to retrieve. If this parameter is not provided or null, the method will retrieve all the data.

$default (optional): This is a parameter that allows you to provide a default value, which will be returned if the specified key does not exist in the data. This parameter defaults to null.

getRawData($key = null, $default = null)

Retrieve specific, all, or a subset of raw (unprocessed) data. This method accepts two optional parameters:

Parameters:

$key (optional): This is a parameter that accepts the key for the specific piece of data you want to retrieve from the raw data set. If this parameter is not provided or null, the method will retrieve all the raw data.

$default (optional): This is a parameter that allows you to provide a default value, which will be returned if the specified key does not exist in the raw data. This parameter defaults to null.

hasData($key)

Check for the existence of a data item in the processed data set. This method requires one parameter:

Parameter:

$key: This is the key of the specific data item you want to check. It should be a string value. If the key exists in the processed data set, the method returns true. Otherwise, it returns false.

hasRawData($key)

This method checks for the existence of a data item in the raw data set. It requires one parameter:

Parameter:

$key: This is a string value representing the key of the specific data item you want to verify the existence of in the raw data set. If the key exists in the raw data set, the method returns true. Otherwise, it returns false.

Exceptions

Throws a DataNotFoundNoDefaultException when trying to access a non-existent key and no default is provided.

How to use

Here's a simple example of how to use this trait in your class:


All versions of data-aware with dependencies

PHP Build Version
Package Version
Requires php Version >=8.0.0
symfony/property-access Version ^v7.0.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package vertigolabs/data-aware contains the following files

Loading the files please wait ....