method attr documentation in bbn\Html\Element

function($arr) { $args = \func_get_args(); if ( \is_array($arr) ){ foreach ( $arr as $k => $v ){ if ( $k === 'class' ){ $this->addClass($v); } else{ $this->attr[$k] = $v; } } } else if ( (\count($args) === 2) && \is_string($args[0]) && \is_string($args[1]) ){ if ( $args[0] === 'class' ){ $this->addClass($args[1]); } else{ $this->attr[$args[0]] = $args[1]; } } else if ( \is_string($arr) && isset($this->attr[$arr]) ){ return $this->attr[$arr]; } return $this; }

BBN is a suite of PHP and JS libraries and VueJS components - all open-source! bbn.io, build applications, the quick way

This website uses cookies to ensure you get the best experience on our website.