protected function filterProperties(array $properties) {
        $tags = array_fill_keys($this->allowedTags, 1);

        if (empty($tags) || isset($tags['*'])) {
            return $properties;
        }

        $filtered = [];

        foreach ($properties as $key => $value) {
            if (isset($tags[$key])) {
                $filtered[$key] = $value;
                continue;
            }

            if (($pos = strpos($key, ':')) !== false) {
                $namespace = substr($key, 0, $pos);

                if (isset($tags[$namespace . ':*'])) {
                    $filtered[$key] = $value;
                    continue;
                }
            }
        }

        return $filtered;
    }
protected function filterProperties(array $properties) {
        $tags = array_fill_keys($this->allowedTags, 1);

        if (empty($tags) || isset($tags['*'])) {
            return $properties;
        }

        $filtered = [];

        foreach ($properties as $key => $value) {
            if (isset($tags[$key])) {
                $filtered[$key] = $value;
                continue;
            }

            if (($pos = strpos($key, ':')) !== false) {
                $namespace = substr($key, 0, $pos);

                if (isset($tags[$namespace . ':*'])) {
                    $filtered[$key] = $value;
                    continue;
                }
            }
        }

        return $filtered;
    }
protected function filterProperties ( array $ properties ) { $ tags = array_fill_keys ( $ this -> allowedTags , 1 ) ; if ( empty ( $ tags ) || isset ( $ tags [ '*' ] ) ) { return $ properties ; } $ filtered = [ ] ; foreach ( $ properties as $ key => $ value ) { if ( isset ( $ tags [ $ key ] ) ) { $ filtered [ $ key ] = $ value ; continue ; } if ( ( $ pos = strpos ( $ key , ':' ) ) !== false ) { $ namespace = substr ( $ key , 0 , $ pos ) ; if ( isset ( $ tags [ $ namespace . ':*' ] ) ) { $ filtered [ $ key ] = $ value ; continue ; } } } return $ filtered ; }
Filter out any unwanted properties

@param array $properties An array of properties to filter
@return array A filtered array of properties
Filter out any unwanted properties