public function convertExtension(array $data = null, array $cmisKeys = [])
    {
        $extensions = [];

        foreach (array_diff_key((array) $data, array_flip($cmisKeys)) as $key => $value) {

            if (!is_array($value)) {
                $value = (empty($value)) ? null : (string) $value;
                $extensions[] = new CmisExtensionElement(null, $key, [], $value);
            } else {
                $extension = $this->convertExtension($value, $cmisKeys);

                if (!empty($extension)) {
                    $extensions[] = new CmisExtensionElement(
                        null,
                        $key,
                        [],
                        null,
                        $extension
                    );
                }
            }
        }

        return $extensions;
    }