summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--inc/cliopts.php4
-rw-r--r--inc/feedcreator.class.php56
-rw-r--r--lib/plugins/config/settings/extra.class.php2
3 files changed, 48 insertions, 14 deletions
diff --git a/inc/cliopts.php b/inc/cliopts.php
index 7d71c7dc9..d7d06119a 100644
--- a/inc/cliopts.php
+++ b/inc/cliopts.php
@@ -447,7 +447,7 @@ class Doku_Cli_Opts_Error {
var $code;
var $msg;
- function Doku_Cli_Opts_Error($code, $msg) {
+ function __construct($code, $msg) {
$this->code = $code;
$this->msg = $msg;
}
@@ -468,7 +468,7 @@ class Doku_Cli_Opts_Container {
var $options = array();
var $args = array();
- function Doku_Cli_Opts_Container($options) {
+ function __construct($options) {
foreach ( $options[0] as $option ) {
if ( false !== ( strpos($option[0], '--') ) ) {
$opt_name = substr($option[0], 2);
diff --git a/inc/feedcreator.class.php b/inc/feedcreator.class.php
index b90da5724..fe444b39b 100644
--- a/inc/feedcreator.class.php
+++ b/inc/feedcreator.class.php
@@ -129,6 +129,9 @@ class FeedItem extends HtmlDescribable {
// var $source;
}
+/**
+ * Class EnclosureItem
+ */
class EnclosureItem extends HtmlDescribable {
/*
*
@@ -226,7 +229,7 @@ class FeedHtmlField {
* Creates a new instance of FeedHtmlField.
* @param string $parFieldContent: if given, sets the rawFieldContent property
*/
- function FeedHtmlField($parFieldContent) {
+ function __construct($parFieldContent) {
if ($parFieldContent) {
$this->rawFieldContent = $parFieldContent;
}
@@ -482,6 +485,8 @@ class FeedCreator extends HtmlDescribable {
var $additionalElements = Array();
+ var $_timeout;
+
/**
* Adds an FeedItem to the feed.
*
@@ -505,7 +510,7 @@ class FeedCreator extends HtmlDescribable {
* @param int $length the maximum length the string should be truncated to
* @return string the truncated string
*/
- function iTrunc($string, $length) {
+ static function iTrunc($string, $length) {
if (strlen($string)<=$length) {
return $string;
}
@@ -604,6 +609,8 @@ class FeedCreator extends HtmlDescribable {
/**
* @since 1.4
* @access private
+ *
+ * @param string $filename
*/
function _redirect($filename) {
// attention, heavily-commented-out-area
@@ -697,7 +704,7 @@ class FeedDate {
* Accepts RFC 822, ISO 8601 date formats as well as unix time stamps.
* @param mixed $dateString optional the date this FeedDate will represent. If not specified, the current date and time is used.
*/
- function FeedDate($dateString="") {
+ function __construct($dateString="") {
if ($dateString=="") $dateString = date("r");
if (is_numeric($dateString)) {
@@ -878,7 +885,10 @@ class RSSCreator091 extends FeedCreator {
*/
var $RSSVersion;
- function RSSCreator091() {
+ /**
+ * Constructor
+ */
+ function __construct() {
$this->_setRSSVersion("0.91");
$this->contentType = "application/rss+xml";
}
@@ -886,6 +896,8 @@ class RSSCreator091 extends FeedCreator {
/**
* Sets this RSS feed's version number.
* @access private
+ *
+ * @param $version
*/
function _setRSSVersion($version) {
$this->RSSVersion = $version;
@@ -1034,7 +1046,10 @@ class RSSCreator091 extends FeedCreator {
*/
class RSSCreator20 extends RSSCreator091 {
- function RSSCreator20() {
+ /**
+ * Constructor
+ */
+ function __construct() {
parent::_setRSSVersion("2.0");
}
@@ -1051,7 +1066,10 @@ class RSSCreator20 extends RSSCreator091 {
*/
class PIECreator01 extends FeedCreator {
- function PIECreator01() {
+ /**
+ * Constructor
+ */
+ function __construct() {
$this->encoding = "utf-8";
}
@@ -1113,7 +1131,10 @@ class PIECreator01 extends FeedCreator {
*/
class AtomCreator10 extends FeedCreator {
- function AtomCreator10() {
+ /**
+ * Constructor
+ */
+ function __construct() {
$this->contentType = "application/atom+xml";
$this->encoding = "utf-8";
}
@@ -1200,7 +1221,10 @@ class AtomCreator10 extends FeedCreator {
*/
class AtomCreator03 extends FeedCreator {
- function AtomCreator03() {
+ /**
+ * Constructor
+ */
+ function __construct() {
$this->contentType = "application/atom+xml";
$this->encoding = "utf-8";
}
@@ -1272,12 +1296,19 @@ class AtomCreator03 extends FeedCreator {
* @author Kai Blankenhorn <kaib@bitfolge.de>
*/
class MBOXCreator extends FeedCreator {
-
- function MBOXCreator() {
+ /**
+ * Constructor
+ */
+ function __construct() {
$this->contentType = "text/plain";
$this->encoding = "utf-8";
}
+ /**
+ * @param string $input
+ * @param int $line_max
+ * @return string
+ */
function qp_enc($input = "", $line_max = 76) {
$hex = array('0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F');
$lines = preg_split("/(?:\r\n|\r|\n)/", $input);
@@ -1363,7 +1394,10 @@ class MBOXCreator extends FeedCreator {
*/
class OPMLCreator extends FeedCreator {
- function OPMLCreator() {
+ /**
+ * Constructor
+ */
+ function __construct() {
$this->encoding = "utf-8";
}
diff --git a/lib/plugins/config/settings/extra.class.php b/lib/plugins/config/settings/extra.class.php
index c6a3f9dae..2445577d1 100644
--- a/lib/plugins/config/settings/extra.class.php
+++ b/lib/plugins/config/settings/extra.class.php
@@ -15,7 +15,7 @@ if (!class_exists('setting_sepchar')) {
* @param string $key
* @param array|null $param array with metadata of setting
*/
- function setting_sepchar($key,$param=null) {
+ function __construct($key,$param=null) {
$str = '_-.';
for ($i=0;$i<strlen($str);$i++) $this->_choices[] = $str{$i};