~yoboy-leguesh/ubuntu-fr-doc/maj20150810a

« back to all changes in this revision

Viewing changes to inc/feedcreator.class.php

  • Committer: YoBoY
  • Date: 2015-11-11 10:05:14 UTC
  • Revision ID: yoboy.leguesh@gmail.com-20151111100514-bw7p06lrhban4g2t
Mise à jour vers Dokuwiki 2015-08-10a avec nos patchs

Show diffs side-by-side

added added

removed removed

Lines of Context:
129
129
    // var $source;
130
130
}
131
131
 
 
132
/**
 
133
 * Class EnclosureItem
 
134
 */
132
135
class EnclosureItem extends HtmlDescribable {
133
136
    /*
134
137
    *
226
229
     * Creates a new instance of FeedHtmlField.
227
230
     * @param string $parFieldContent: if given, sets the rawFieldContent property
228
231
     */
229
 
    function FeedHtmlField($parFieldContent) {
 
232
    function __construct($parFieldContent) {
230
233
        if ($parFieldContent) {
231
234
            $this->rawFieldContent = $parFieldContent;
232
235
        }
482
485
    var $additionalElements = Array();
483
486
 
484
487
 
 
488
    var $_timeout;
 
489
 
485
490
    /**
486
491
     * Adds an FeedItem to the feed.
487
492
     *
505
510
     * @param int     $length the maximum length the string should be truncated to
506
511
     * @return string    the truncated string
507
512
     */
508
 
    function iTrunc($string, $length) {
 
513
    static function iTrunc($string, $length) {
509
514
        if (strlen($string)<=$length) {
510
515
            return $string;
511
516
        }
604
609
    /**
605
610
     * @since 1.4
606
611
     * @access private
 
612
     *
 
613
     * @param string $filename
607
614
     */
608
615
    function _redirect($filename) {
609
616
        // attention, heavily-commented-out-area
697
704
     * Accepts RFC 822, ISO 8601 date formats as well as unix time stamps.
698
705
     * @param mixed $dateString optional the date this FeedDate will represent. If not specified, the current date and time is used.
699
706
     */
700
 
    function FeedDate($dateString="") {
 
707
    function __construct($dateString="") {
701
708
        if ($dateString=="") $dateString = date("r");
702
709
 
703
710
        if (is_numeric($dateString)) {
878
885
     */
879
886
    var $RSSVersion;
880
887
 
881
 
    function RSSCreator091() {
 
888
    /**
 
889
     * Constructor
 
890
     */
 
891
    function __construct() {
882
892
        $this->_setRSSVersion("0.91");
883
893
        $this->contentType = "application/rss+xml";
884
894
    }
886
896
    /**
887
897
     * Sets this RSS feed's version number.
888
898
     * @access private
 
899
     *
 
900
     * @param $version
889
901
     */
890
902
    function _setRSSVersion($version) {
891
903
        $this->RSSVersion = $version;
1034
1046
 */
1035
1047
class RSSCreator20 extends RSSCreator091 {
1036
1048
 
1037
 
    function RSSCreator20() {
 
1049
    /**
 
1050
     * Constructor
 
1051
     */
 
1052
    function __construct() {
1038
1053
        parent::_setRSSVersion("2.0");
1039
1054
    }
1040
1055
 
1051
1066
 */
1052
1067
class PIECreator01 extends FeedCreator {
1053
1068
 
1054
 
    function PIECreator01() {
 
1069
    /**
 
1070
     * Constructor
 
1071
     */
 
1072
    function __construct() {
1055
1073
        $this->encoding = "utf-8";
1056
1074
    }
1057
1075
 
1113
1131
 */
1114
1132
class AtomCreator10 extends FeedCreator {
1115
1133
 
1116
 
    function AtomCreator10() {
 
1134
    /**
 
1135
     * Constructor
 
1136
     */
 
1137
    function __construct() {
1117
1138
        $this->contentType = "application/atom+xml";
1118
1139
        $this->encoding = "utf-8";
1119
1140
    }
1200
1221
 */
1201
1222
class AtomCreator03 extends FeedCreator {
1202
1223
 
1203
 
    function AtomCreator03() {
 
1224
    /**
 
1225
     * Constructor
 
1226
     */
 
1227
    function __construct() {
1204
1228
        $this->contentType = "application/atom+xml";
1205
1229
        $this->encoding = "utf-8";
1206
1230
    }
1272
1296
 * @author Kai Blankenhorn <kaib@bitfolge.de>
1273
1297
 */
1274
1298
class MBOXCreator extends FeedCreator {
1275
 
 
1276
 
    function MBOXCreator() {
 
1299
    /**
 
1300
     * Constructor
 
1301
     */
 
1302
    function __construct() {
1277
1303
        $this->contentType = "text/plain";
1278
1304
        $this->encoding = "utf-8";
1279
1305
    }
1280
1306
 
 
1307
    /**
 
1308
     * @param string $input
 
1309
     * @param int $line_max
 
1310
     * @return string
 
1311
     */
1281
1312
    function qp_enc($input = "", $line_max = 76) {
1282
1313
        $hex = array('0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F');
1283
1314
        $lines = preg_split("/(?:\r\n|\r|\n)/", $input);
1363
1394
 */
1364
1395
class OPMLCreator extends FeedCreator {
1365
1396
 
1366
 
    function OPMLCreator() {
 
1397
    /**
 
1398
     * Constructor
 
1399
     */
 
1400
    function __construct() {
1367
1401
        $this->encoding = "utf-8";
1368
1402
    }
1369
1403