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;
    }
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;
    }
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 ; }
Convert given input data to an Extension object

@param array|null $data
@param string[] $cmisKeys
@return CmisExtensionElement[]
Convert given input data to an Extension object