Get style attribute in array

@return array
519884
public function getStyleAttributeArray(): array
    {
        $value = $this->getAttribute('style')['value'];

        if ($value === null) {
            return [];
        }

        $value = explode(';', substr(trim($value), 0, -1));
        $result = [];
        foreach ($value as $attr) {
            $attr = explode(':', $attr);
            $result[$attr[0]] = $attr[1];
        }

        return $result;
    }
939291
protected function _getFromCSS()
    {
        // styles to apply
        $styles = array();

        // list of the selectors to get in the CSS files
        $getit  = array();

        // get the list of the selectors of each tags
        $lst = array();
        $lst[] = $this->value['id_lst'];
        for ($i=count($this->table)-1; $i>=0; $i--) {
            $lst[] = $this->table[$i]['id_lst'];
        }

        // foreach selectors in the CSS files, verify if it match with the list of selectors
        foreach ($this->cssKeys as $key => $num) {
            if ($this->_getReccursiveStyle($key, $lst)) {
                $getit[$key] = $num;
            }
        }

        // if we have selectors
        if (count($getit)) {
            // get them, but in the definition order, because of priority
            asort($getit);
            foreach ($getit as $key => $val) $styles = array_merge($styles, $this->css[$key]);
        }

        return $styles;
    }
441221
public function getImageAttributes()
    {
        $attributes = [
            'src' => $this->ImageURL,
            'class' => $this->ImageClass,
            'title' => $this->ImageTitleText,
            'alt' => $this->ImageAltText
        ];
        
        if ($this->hasVectorImage()) {
            
            if ($width = $this->ImageResizeWidth) {
                $attributes['width'] = $width;
            }
            
            if ($height = $this->ImageResizeHeight) {
                $attributes['height'] = $height;
            }
            
        }
        
        $this->extend('updateImageAttributes', $attributes);
        
        return $attributes;
    }
872404
public function getStyles()
    {
        $styles = $this->config()->get('styles');
        $i18nStyles = array();
        if ($styles) {
            foreach ($styles as $key => $label) {
                $i18nStyles[$key] = _t('PlaceableObject_Preset.STYLE'.strtoupper($key), $label);
            }
        }
        return $i18nStyles;
    }
395547
public function getAttributes():array
    {
        $attributes = $this->attributes;
        if ($this->cssClasses) {
            $attributes['class'] = implode(' ', array_keys($this->cssClasses));
        }
        if ($this->styles) {
            $attributes['style'] = implode(';', $this->styles);
        }
        return $attributes;
    }
666090
function attributes()
    {
        $attributes = array();
        $item = $this->InternalAttributes['item'];
        if ( is_array( $item ) )
        {
            $attributes = array_keys( $item );
        }
        else if ( is_object( $item ) and
                  method_exists( $item, 'attributes' ) )
        {
            $attributes = $item->attributes();
        }
        $attributes = array_merge( $this->InternalAttributes, $attributes );
        $attributes = array_unique( $attributes );
        return $attributes;
    }
792986
public function get_styles() {

		$styles = null;

		foreach ( $this->configs as $config_id => $args ) {

			if ( true === $this->is_disabled( $args ) ) {
				continue;
			}

			$modules_css = $this->modules_css;
			$styles      = $modules_css::loop_controls( $config_id ); // phpcs:ignore PHPCompatibility.Syntax.NewDynamicAccessToStatic
			$styles      = apply_filters( "kirki_gutenberg_{$config_id}_dynamic_css", $styles );

			if ( empty( $styles ) ) {
				continue;
			}
		}

		return $styles;
	}
1149452
public function getAttributes(): array
    {
        $attributes = [];
        if ($this->confirm && $this->publicKey) {
            $attributes['confirm'] = $this->confirm;
            $attributes['public_key'] = $this->publicKey;
        }
        return $attributes;
    }
501415
protected function getDataAttributes()
    {
        $ret        = array();
        $properties = array(
            'backdrop',
            'keyboard',
            'show',
            'remote',
        );

        foreach ($properties as $property) {
            $value = $this->{'get'.$property}();

            if ($value) {
                $ret['data-' . $property] = $value;
            }
        }

        return $ret;
    }
515933
public static function getStyles()
    {
        $styles = [];

        $iterator = new \DirectoryIterator(ForumEnv::get('WEB_ROOT').'themes/');
        foreach ($iterator as $child) {
            if (!$child->isDot() && $child->isDir() &&
                file_exists($child->getPathname().DIRECTORY_SEPARATOR.'style.css')) {
                // If the theme is well formed, add it to the list
                $styles[] = $child->getFileName();
            }
        }

        natcasesort($styles);
        return $styles;
    }
900729
public function getAttributes(): array
    {
        $attributes = $this->tag->getAttributes();
        foreach ($attributes as $name => $info) {
            $attributes[$name] = $info['value'];
        }

        return $attributes;
    }
145624
public function getAttributes()
    {
        $attributes = array_merge(
            parent::getAttributes(),
            [
                'href' => '#top',
                'title' => $this->Label,
                'data-offset-show' => $this->OffsetShow,
                'data-offset-opacity' => $this->OffsetOpacity,
                'data-scroll-duration' => $this->ScrollDuration
            ]
        );
        
        return $attributes;
    }
280669
protected function attributes() {return
		($this->isNative() ? $this->attributesN() :
			['href' => $this->lHref(), 'title' => $this->s()->label()]
		)
		+ [
			'class' => df_cc_s(
				'df-sso-button', $this->cssClass(), $this->s()->type(), $this->cssClass2()
			)
			,'id' => df_uid(4, "{$this->cssClass()}-")
			,'rel' => 'nofollow'
		]
	;}
543718
public function getTooltipAttributes():array
    {
        if ($this->tooltip !== null) {
            $attrs = $this->tooltipOptions;
            $attrs['data-toggle'] = 'tooltip';
            $attrs['title'] = $this->tooltip;
            return $attrs;
        }
        return [];
    }
158085
public function getAttributes()
    {
        $attributes = $this->attributes ? $this->attributes : [];

        array_forget($attributes, ['active', 'icon']);

        return HTML::attributes($attributes);
    }
788014
public function attributes()
	{
		if (!is_array($this->attrs)) {
			return '';
		}

		$s = '';
		$attrs = $this->attrs;

		foreach ($attrs as $key => $value) {
			if ($value === NULL || $value === FALSE) {
				continue;

			} elseif ($value === TRUE) {
				if (static::$xhtml) {
					$s .= ' ' . $key . '="' . $key . '"';
				} else {
					$s .= ' ' . $key;
				}
				continue;

			} elseif (is_array($value)) {
				if (strncmp($key, 'data-', 5) === 0) {
					$value = json_encode($value);

				} else {
					$tmp = NULL;
					foreach ($value as $k => $v) {
						if ($v != NULL) { // intentionally ==, skip NULLs & empty string
							//  composite 'style' vs. 'others'
							$tmp[] = $v === TRUE ? $k : (is_string($k) ? $k . ':' . $v : $v);
						}
					}
					if ($tmp === NULL) {
						continue;
					}

					$value = implode($key === 'style' || !strncmp($key, 'on', 2) ? ';' : ' ', $tmp);
				}

			} elseif (is_float($value)) {
				$value = rtrim(rtrim(number_format($value, 10, '.', ''), '0'), '.');

			} else {
				$value = (string)$value;
			}

			$q = strpos($value, '"') === FALSE ? '"' : "'";
			$s .= ' ' . $key . '=' . $q
				. str_replace(
					['&', $q, '<'],
					['&amp;', $q === '"' ? '&quot;' : '&#39;', self::$xhtml ? '&lt;' : '<'],
					$value
				)
				. (strpos($value, '`') !== FALSE && strpbrk($value, ' <>"\'') === FALSE ? ' ' : '')
				. $q;
		}

		$s = str_replace('@', '&#64;', $s);

		return $s;
	}
515309
public function getAttributes()
    {
        $attributes = array(
            'type' => $this->getInputType(),
            'name' => $this->getName(),
            'value' => $this->Value(),
            'class' => $this->extraClass(),
            'id' => $this->ID(),
            'disabled' => $this->isDisabled(),
            'readonly' => $this->isReadonly(),
            'autofocus' => $this->isAutofocus()
        );

        if ($this->Required()) {
            $attributes['required'] = 'required';
            $attributes['aria-required'] = 'true';
        }

        $attributes = array_merge($attributes, $this->attributes);

        $this->extend('updateAttributes', $attributes);

        return $attributes;
    }