Skip to content

Commit

Permalink
loadHtml()
Browse files Browse the repository at this point in the history
  • Loading branch information
dermatthes committed Apr 24, 2020
1 parent 30d75eb commit b6f9c07
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/Fhtml/FHtml.php
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,19 @@ public function offsetSet($offset, $value)
$elem->content($value);
}


/**
* Load template directly from HTML File
*
* @param string $filename
* @return $this
*/
public function loadHtml(string $filename)
{
$this[] = new RawHtmlNode(file_get_contents($filename));
return $this;
}

/**
* Offset to unset
* @link http://php.net/manual/en/arrayaccess.offsetunset.php
Expand Down

0 comments on commit b6f9c07

Please sign in to comment.