Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Generated on May 18, 2024 via composer

symfony/property-access v7.0.0

Provides functions to read and write from/to an object or array using a simple string notation
Package summary
Share
0
issues
1
license
7
MIT
Package created
14 Jan 2013
Version published
27 Sep 2023
Maintainers
1
Total deps
7
Direct deps
1
License
MIT

Issues

0
This package has no issues

Licenses

MIT License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
Cannot
hold-liable
Must
include-copyright
include-license
7 Packages, Including:
symfony/polyfill-ctype@v1.29.0
symfony/polyfill-intl-grapheme@v1.29.0
symfony/polyfill-intl-normalizer@v1.29.0
symfony/polyfill-mbstring@v1.29.0
symfony/property-access@v7.0.0
symfony/property-info@v7.0.7
symfony/string@v7.0.7
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

1
All Dependencies CSV
β“˜ This is a list of symfony/property-access 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities
symfony/property-infov7.0.7-MIT
prod

Visualizations

Frequently Asked Questions

What does symfony/property-access do?

The Symfony PropertyAccess component offers the utility of reading and writing from/to any object or array leveraging a straightforward string notation. This PHP package simplifies interaction with arrays or objects, especially when dealing with dynamic key or property names.

How do you use symfony/property-access?

Making use of the Symfony PropertyAccess is quite simple. We start by installing it using composer.

composer require symfony/property-access

Here's an example of how to use this package:

use Symfony\Component\PropertyAccess\PropertyAccess;

$accessor = PropertyAccess::createPropertyAccessor();

$arrayData = array(
   'firstName' => 'Johnny',
   'lastName' => 'Cash'
);

echo $accessor->getValue($arrayData, '[firstName]');
// output: Johnny

$accessor->setValue($arrayData, '[firstName]', 'Elvis');
echo $accessor->getValue($arrayData, '[firstName]');
// output: Elvis

In this code, we create a property accessor, and define an array. We can get and set values in the array using the getValue() and setValue() functions respectively, alongside the string notation to refer to the array keys.

Where are the symfony/property-access docs?

The full documentation for the Symfony PropertyAccess package can be found on the Symfony Documentation Website. It provides in-depth knowledge, including detailed usage, functionality, and configuration options for the package.