コード例 #1
0
ファイル: HtmlPage.php プロジェクト: kevinlondon/appfuel
 /**
  * @param	GenericTagInterface	$src
  * @return	HtmlPage
  */
 public function setInlineScriptTag(GenericTagInterface $tag)
 {
     if ('script' !== $tag->getTagName()) {
         $err = 'the inline script must have a tag name of -(script)';
         throw new InvalidArgumentException($err);
     }
     if ($tag->isAttribute('src')) {
         $err = 'inline script tag can not have a src attribute';
         throw new InvalidArgumentException($err);
     }
     $this->inlineScript = $tag;
 }