PHPackages                             misbah/prop-monitor - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. misbah/prop-monitor

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

misbah/prop-monitor
===================

This library will help you to check nested php objects whether they have some certain properties or not.

2.0.0(7y ago)111MITPHP

Since Jan 20Pushed 7y agoCompare

[ Source](https://github.com/Misbah-Ahmad/php-prop-monitor)[ Packagist](https://packagist.org/packages/misbah/prop-monitor)[ RSS](/packages/misbah-prop-monitor/feed)WikiDiscussions master Synced yesterday

READMEChangelog (4)DependenciesVersions (5)Used By (0)

php-prop-monitor
================

[](#php-prop-monitor)

A simple php library that digs into nested php objects to find certain properties.

It's handy if you have to work with a large object 😱 &amp; you also want to avoid using *property\_exists(class, property)* 😏 several times to find a single property :).

Installation
------------

[](#installation)

use ***composer require misbah/prop-monitor*** to install

Changelog
---------

[](#changelog)

- 2.0.0

    ```
    Added get($object, array $properties) function to extract a desired value by following a path of properties & array indices.

    ```

Usage
-----

[](#usage)

Let the following json object is converted to StdClass:

```
$users = {

  'users' : [
    {
      'name' : 'John Doe',
      'email: 'john@doe.com',
      'social': {
        'twitter': '@jdoe',
        'facebook': '@johndoe',
        'github': '@jdoegit'
      }
    }
  ]

}

```

### Check whether 'github' property is present or not for the first user in the users array

[](#check-whether-github-property-is-present-or-not-for-the-first-user-in-the-users-array)

```
