src/KeepUpdate/PropertyDAO.php
public function getSynchronizedProperty(\JsonSerializable $classInstance, array $data)
    {
        $keys = array_keys($classInstance->jsonSerialize());
        $sync = array();

        // Check if all key are there
        foreach ($keys as $key) {
            $camelCaseKey = $this->toCamelCase($key);

            if (array_key_exists($key, $data) === false) {
                throw new ValidationException(sprintf('Key "%s" does not exist in "%s"', $key, json_encode($data)));
            } elseif (property_exists($classInstance, $camelCaseKey) === true) {
                $sync[] = $camelCaseKey;
            }
        }

        return $sync;
    }
public function getSynchronizedProperty(\JsonSerializable $classInstance, array $data)
    {
        $keys = array_keys($classInstance->jsonSerialize());
        $sync = array();

        // Check if all key are there
        foreach ($keys as $key) {
            $camelCaseKey = $this->toCamelCase($key);

            if (array_key_exists($key, $data) === false) {
                throw new ValidationException(sprintf('Key "%s" does not exist in "%s"', $key, json_encode($data)));
            } elseif (property_exists($classInstance, $camelCaseKey) === true) {
                $sync[] = $camelCaseKey;
            }
        }

        return $sync;
    }
public function getSynchronizedProperty ( \ JsonSerializable $ classInstance , array $ data ) { $ keys = array_keys ( $ classInstance -> jsonSerialize ( ) ) ; $ sync = array ( ) ; // Check if all key are there foreach ( $ keys as $ key ) { $ camelCaseKey = $ this -> toCamelCase ( $ key ) ; if ( array_key_exists ( $ key , $ data ) === false ) { throw new ValidationException ( sprintf ( 'Key "%s" does not exist in "%s"' , $ key , json_encode ( $ data ) ) ) ; } elseif ( property_exists ( $ classInstance , $ camelCaseKey ) === true ) { $ sync [ ] = $ camelCaseKey ; } } return $ sync ; }
Retrieve the synchorinized property with return data by jsonSerialize

@param JsonSerializable $classInstance
@param array $data
@return array
Retrieve the synchorinized property with return data by jsonSerialize