2017 © Pedro Peláez
 

library php-dom-manipulations

Collections of dom manipulations

image

24hoursmedia/php-dom-manipulations

Collections of dom manipulations

  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 1 Open issues
  • 5 Versions
  • 1 % Grown

The README.md

php-dom-manipulations

A library to manipulate dom., (*1)

Manipulators

Add google analytics campaign information to all links in a document., (*2)

Usage:, (*3)

$html = '<a href="test.html">a</a><a href="test2.html">a</a><a href="#test">c</a>';
$doc = new \DOMDocument();
$doc->loadHTML($html, LIBXML_HTML_NOIMPLIED | LIBXML_HTML_NODEFDTD);
$m = new \T4\DomManipulations\Manipulator\Ga\GaAddCampaignToLinks();
// source, medium, campaign
$m->modify($doc, 'newsletter-week14', 'email', 'spring');
$newHtml = $doc->saveHTML();

// $newHtml:
// <a href="test.html" utm_source="newsletter-week14" utm_medium="email" utm_campaign="spring">a</a><a href="test2.html" utm_source="newsletter-week14" utm_medium="email" utm_campaign="spring">a</a><a href="#test">c</a>

The Versions

21/11 2016

dev-php-dom-manipulations-3

dev-php-dom-manipulations-3 https://github.com/24HOURSMEDIA/php-dom-manipulations

Collections of dom manipulations

  Sources   Download

MIT

The Requires

  • php >=5.6

 

21/11 2016

dev-master

9999999-dev https://github.com/24HOURSMEDIA/php-dom-manipulations

Collections of dom manipulations

  Sources   Download

MIT

The Requires

  • php >=5.6

 

21/11 2016

v0.1.3

0.1.3.0 https://github.com/24HOURSMEDIA/php-dom-manipulations

Collections of dom manipulations

  Sources   Download

MIT

The Requires

  • php >=5.6

 

20/11 2016

v0.1.1

0.1.1.0 https://github.com/24HOURSMEDIA/php-dom-manipulations

Collections of dom manipulations

  Sources   Download

MIT

The Requires

  • php >=5.6

 

20/11 2016

v0.1

0.1.0.0 https://github.com/24HOURSMEDIA/php-dom-manipulations

Collections of dom manipulations

  Sources   Download

MIT

The Requires

  • php >=5.6