setAttributes('type','text/javascript') ->setAttributes('src',''); $this->isAsync = false; $this->isDefer = false; } /** * @param $value * @return $this */ public function setType($value){ $this->setAttributes('type',$value); return $this; } public function getType(){ return $this->getAttributes('type'); } /** * @param $value * @return $this */ public function setSrc($value){ $this->setAttributes('src',$value); return $this; } public function getSrc(){ return $this->getAttributes('src'); } /** * @param $bool * @return $this */ public function setAsync($bool){ $this->isAsync = $bool; if($bool){ $this->setAttributes('async','TRUE'); } else { $this->removeAttribute('async'); } return $this; } public function getAsync(){ return $this->isAsync; } /** * @param $bool * @return $this */ public function setDefer($bool){ $this->isDefer = $bool; if($bool){ $this->setAttributes('defer','TRUE'); } else { $this->removeAttribute('defer'); } return $this; } public function getDefer(){ return $this->isDefer; } /** * @param $value * @return $this */ public function setCharset($value){ $this->setAttributes('charset',$value); return $this; } public function getCharset(){ return $this->getAttributes('charset'); } }