Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dolibarr
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container registry
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Software_Artifact_Infrastructure_Repository
dolibarr
Commits
29fa8b64
Commit
29fa8b64
authored
12 years ago
by
Laurent Destailleur
Browse files
Options
Downloads
Patches
Plain Diff
Checkstyle
parent
8a42cc26
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
htdocs/core/class/rssparser.class.php
+46
-30
46 additions, 30 deletions
htdocs/core/class/rssparser.class.php
with
46 additions
and
30 deletions
htdocs/core/class/rssparser.class.php
+
46
−
30
View file @
29fa8b64
<?php
/* Copyright (C) 2011 Laurent Destailleur <eldy@users.sourceforge.net>
/* Copyright (C) 2011
-2012
Laurent Destailleur <eldy@users.sourceforge.net>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
...
...
@@ -18,7 +18,11 @@
/**
* \file htdocs/core/class/rssparser.class.php
* \ingroup core
* \brief File of class to parse rss feeds
* \brief File of class to parse RSS feeds
*/
/**
* Class to parse RSS files
*/
class
RssParser
{
...
...
@@ -38,20 +42,38 @@ class RssParser
private
$_lastfetchdate
;
// Last successful fetch
private
$_rssarray
=
array
();
// For parsing with xmlparser
var
$stack
=
array
();
// parser stack
var
$_CONTENT_CONSTRUCTS
=
array
(
'content'
,
'summary'
,
'info'
,
'title'
,
'tagline'
,
'copyright'
);
/**
* Constructor
*
* @param DoliDB $db Database handler
*/
public
function
__construct
(
$db
)
{
$this
->
db
=
$db
;
}
/**
* getFormat
*
* @return string
*/
public
function
getFormat
()
{
public
function
getFormat
()
{
return
$this
->
_format
;
}
/**
* getUrlRss
*
* @return string
*/
public
function
getUrlRss
()
{
public
function
getUrlRss
()
{
return
$this
->
_urlRSS
;
}
/**
...
...
@@ -59,7 +81,8 @@ class RssParser
*
* @return string
*/
public
function
getLanguage
()
{
public
function
getLanguage
()
{
return
$this
->
_language
;
}
/**
...
...
@@ -67,7 +90,8 @@ class RssParser
*
* @return string
*/
public
function
getGenerator
()
{
public
function
getGenerator
()
{
return
$this
->
_generator
;
}
/**
...
...
@@ -75,7 +99,8 @@ class RssParser
*
* @return string
*/
public
function
getCopyright
()
{
public
function
getCopyright
()
{
return
$this
->
_copyright
;
}
/**
...
...
@@ -83,7 +108,8 @@ class RssParser
*
* @return string
*/
public
function
getLastBuildDate
()
{
public
function
getLastBuildDate
()
{
return
$this
->
_lastbuilddate
;
}
/**
...
...
@@ -91,7 +117,8 @@ class RssParser
*
* @return string
*/
public
function
getImageUrl
()
{
public
function
getImageUrl
()
{
return
$this
->
_imageurl
;
}
/**
...
...
@@ -99,7 +126,8 @@ class RssParser
*
* @return string
*/
public
function
getLink
()
{
public
function
getLink
()
{
return
$this
->
_link
;
}
/**
...
...
@@ -107,7 +135,8 @@ class RssParser
*
* @return string
*/
public
function
getTitle
()
{
public
function
getTitle
()
{
return
$this
->
_title
;
}
/**
...
...
@@ -115,7 +144,8 @@ class RssParser
*
* @return string
*/
public
function
getDescription
()
{
public
function
getDescription
()
{
return
$this
->
_description
;
}
/**
...
...
@@ -123,7 +153,8 @@ class RssParser
*
* @return string
*/
public
function
getLastFetchDate
()
{
public
function
getLastFetchDate
()
{
return
$this
->
_lastfetchdate
;
}
/**
...
...
@@ -131,24 +162,9 @@ class RssParser
*
* @return string
*/
public
function
getItems
()
{
return
$this
->
_rssarray
;
}
// For parsing with xmlparser
var
$stack
=
array
();
// parser stack
var
$_CONTENT_CONSTRUCTS
=
array
(
'content'
,
'summary'
,
'info'
,
'title'
,
'tagline'
,
'copyright'
);
/**
* Constructor
*
* @param DoliDB $db Database handler
*/
public
function
__construct
(
$db
)
public
function
getItems
()
{
$this
->
db
=
$db
;
return
$this
->
_rssarray
;
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment