com web/pres2: Get rid of PHP 4-style constructors: XML_Slide.php display.php reveal.js
| From: | Rasmus Lerdorf | Date: | Sat, 06 May 2017 13:44:51 +0000 |
| Subject: | com web/pres2: Get rid of PHP 4-style constructors: XML_Slide.php display.php reveal.js | ||
| Groups: | php.pres | ||
| Request: | Send a blank email to pres+get-2216@lists.php.net to get a copy of this message | ||
Commit: 5dbc9058f49bc3a7fd6e58f7a606cf95c69c49e0
Author: Rasmus Lerdorf <rasmus@php.net> Sat, 6 May 2017 06:44:51 -0700
Parents: f1139644a4cfd7bbfaafb7675a3c01945458951a
Branches: master
Link: http://git.php.net/?p=web/pres2.git;a=commitdiff;h=5dbc9058f49bc3a7fd6e58f7a606cf95c69c49e0
Log:
Get rid of PHP 4-style constructors
Changed paths:
M XML_Slide.php
M display.php
M reveal.js
Diff:
diff --git a/XML_Slide.php b/XML_Slide.php
index d3e149d...70612a1 100644
--- a/XML_Slide.php
+++ b/XML_Slide.php
@@ -74,7 +74,7 @@ class XML_Slide extends XML_Parser
* @param mixed File pointer or name of the slide file.
* @return void
*/
- function XML_Slide($handle = '')
+ function __construct($handle = '')
{
parent::__construct('UTF-8');
if (@is_resource($handle)) {
diff --git a/display.php b/display.php
index 763d477..de533c3 100644
--- a/display.php
+++ b/display.php
@@ -24,7 +24,7 @@ if(!function_exists('pdf_set_font')) {
class display {
// dump in config values
- function display($c) {
+ function __construct($c) {
foreach($c as $k => $v) {
$this->$k = $v;
}
@@ -1234,8 +1234,8 @@ type="application/x-shockwave-flash" width="<?php echo
$dx?>" height="<?php echo
class pdf extends display {
- function pdf($c) {
- parent::display($c);
+ function __construct($c) {
+ parent::__construct($c);
}
// {{{ my_new_pdf_page($pdf, $x, $y, $new_page)
@@ -2037,26 +2037,26 @@ class pdf extends display {
}
class pdfus extends pdf {
- function pdfus($c) {
+ function __construct($c) {
// US-Letter
$this->pdf_x = 612; $this->pdf_y = 792;
- parent::pdf($c);
+ parent::__construct($c);
}
}
class pdfusl extends pdf {
- function pdfusl($c) {
+ function __construct($c) {
// US-Legal
$this->pdf_x = 612; $this->pdf_y = 1008;
- parent::pdf($c);
+ parent::__construct($c);
}
}
class pdfa4 extends pdf {
- function pdfa4($c) {
+ function __construct($c) {
// A4
$this->pdf_x = 595; $this->pdf_y = 842;
- parent::pdf($c);
+ parent::__construct($c);
}
}
diff --git a/reveal.js b/reveal.js
index 1413cbc..360bc94 160000
--- a/reveal.js
+++ b/reveal.js
@@ -1 +1 @@
-Subproject commit 1413cbc1a9344a6366c30fb0e83d5b6afc18f6d3
+Subproject commit 360bc940062711db9b8020ce4e848f6c37014481