Met en forme les attributs CSS pour les balises.

@param array $attr Listes des attributs enregistrés.

@return string
972335
protected function getAttributesCSS(array $attr)
    {
        $output = [];
        foreach ($attr as $key => $values) {
            if (in_array($key, $this->attributesCss) && $values !== '') {
                $output[] = $key . '="' . $values . '"';
            }
        }
        $implode = implode(' ', $output);

        return $implode
            ? " $implode"
            : '';
    }
860989
public static function style($content, array $attrs = [])
    {
        $attrs = array_merge(['type' => 'text/css'], $attrs);

        return static::tag('style', PHP_EOL . trim($content) . PHP_EOL, $attrs);
    }
760026
public static function img($attr = null)
    {
        if (is_string($attr)) {
            $attr = array('src' => $attr);
        }

        return self::tag('img', $attr + array('alt' => ''), null, array_merge(self::$common_attrib,
            array('src','alt','width','height','border','usemap','onclick','onerror','onload')));
    }
1061939
public function getAttribute($attr)
    {
        switch($attr)
        {
        case \PDO::ATTR_AUTOCOMMIT:
            return $this->_autocommit;
        case \PDO::ATTR_DRIVER_NAME:
            return 'oci';
        case \PDO::ATTR_CASE:
            return $this->_case;
        }
        return null;
    }
403131
public function form_open(array $attrAdd = null)
    {
        $attr = $this->merge_attr($this->form[ 'open' ][ 'attr' ], $attrAdd);

        return '<form'
            . $this->getAttributesInput($attr)
            . $this->getAttributesCSS($attr)
            . ">\r\n";
    }
795196
protected function post( $attr ) {

		$post  = get_post();
		$class = isset( $attr['class'] ) ? $attr['class'] : '';

		$attr['id']    = ! empty( $post ) ? sprintf( 'post-%d', get_the_ID() ) : 'post-0';
		$attr['class'] = join( ' ', get_post_class( $class ) );

		return $attr;
	}
782223
public function set_cfg($attr){
    if ( null !== $this->cfg ){
      $args = \func_get_args();
      if ( (\count($args) === 2) && \is_string($attr) ){
        /** @var array $attr */
        $attr = [$args[0] => $args[1]];
      }
      foreach ( $attr as $key => $val ){
        if ( \is_string($key) ){
          $this->cfg[$key] = $val;
        }
      }
      $this->set_session(['cfg' => $this->cfg]);
    }
    return $this;
  }
1298984
public function getAttribute($attr) {
        $url = "entities/{$this->_id}/attrs/$attr";

        if ($this->_type) {
            $url .= "?type={$this->_type}";
        }

        return $this->_orion->get($url);
    }
240621
public static function a($attr, $cont)
    {
        if (is_string($attr)) {
            $attr = array('href' => $attr);
        }

        return self::tag('a', $attr, $cont, array_merge(self::$common_attrib,
            array('href','target','name','rel','onclick','onmouseover','onmouseout','onmousedown','onmouseup')));
    }
1304047
public function prependCSS(&$attr, $css)
    {
        $attr['style'] = isset($attr['style']) ? $attr['style'] : '';
        $attr['style'] = $css . $attr['style'];
    }
559718
protected function fixInternalAttr(array $attr = null)
    {
        $attr = (array) $attr;

        $base = array(
            'type' => 'text/css',
            'media' => 'screen',
        );

        unset($attr['rel']);
        unset($attr['href']);

        return array_merge($base, (array) $attr);
    }
1137071
protected function html( $attr ) {

		$attr = [];

		$parts = wp_kses_hair( get_language_attributes(), [ 'http', 'https' ] );

		if ( $parts ) {

			foreach ( $parts as $part ) {

				$attr[ $part['name'] ] = $part['value'];
			}
		}

		return $attr;
	}
203568
private function escapeAttributes($attrs)
    {
        $script = '[';
        $first = true;
        foreach ($attrs as $name => $value) {
            if ($first) {
                $first = false;
            } else {
                $script .= ' ';
            }
            $script .= $name . '=' . self::escape($value);
        }
        $script .= ']';

        return $script;
    }
982830
protected function body( $attr ) {

		$class = isset( $attr['class'] ) && 'body' !== $attr['class'] ? $attr['class'] : '';

		$attr['class'] = join( ' ', get_body_class( $class ) );
		$attr['dir']   = is_rtl() ? 'rtl' : 'ltr';

		return $attr;
	}
136907
protected function getAttrName($attr)
    {
        $name = strtolower($attr);
        if (array_key_exists($name, $this->_map)) {
            $attr = $this->_map[$name];
        }
        return $attr;
    }
47814
public function removeElementsAttr($attr) {
		foreach ($this->getElements() as $element) {
			if ($element instanceof Tag) {
				$element->removeAttr($attr);
			}
		}
		
		return $this;
	}
1131118
static function input_attr(&$attr)
	{
	    $str = " ";
        if(!empty($attr) && is_array($attr))
        {
            foreach($attr as $key=>$value)
            {
                $str .= "$key=\"$value\" ";
            }
        }
        return $str;
	}