Webarchive
, (*1)
A library for writing Apple Safari's 'webarchive' binary plist files, (*2)
Requirements
-
rodneyrehm/plist: 2.*
-
php: >=5.3
Installing
Install the latest version with:, (*3)
composer require 'donatj/webarchive'
Example
To Come!, (*4)
Documentation
Class: \donatj\Webarchive
Method: Webarchive->__construct
function __construct()
Webarchive constructor, (*5)
Method: Webarchive->addMainResource
function addMainResource($content [, $url = null [, $mime = 'text/html' [, $charset = 'UTF-8' [, $headers = null]]]])
Adds the Primary "MainResource" - which is the entry point into the web archive,
usually an HTML document., (*6)
Parameters:
-
string
$content
-
string | null
$url
-
string
$mime
-
string | null
$charset
-
string | null
$headers
Method: Webarchive->addSubResource
function addSubResource($content, $url [, $mime = 'text/html' [, $charset = null [, $headers = null]]])
Adds a secondary resource. Images, JavaScript, XML, JSON, etc.
Resources to accompany the primary document., (*7)
Parameters:
-
string
$content
-
string | null
$url
-
string
$mime
-
string | null
$charset
-
string | null
$headers
Method: Webarchive->save
function save($filename)
Save to a file, (*8)
Parameters:
Method: Webarchive->output
function output()
Output to php://output, (*9)