Galette API documentation
Gestionnaire d’Adhérents en Ligne Extrêmement Tarabiscoté mais Tellement Efficace
1.0.0
Galette\IO\News Class Reference

Public Member Functions

 __construct (string $url, bool $nocache=false)
 
 getPosts ()
 
 getFeedURL (string $url)
 

Protected Member Functions

 getDataTocache ()
 
 cacheLoaded (mixed $contents)
 
 getCacheFilename ()
 
 allowURLFOpen ()
 
 prepareForCache ()
 

Protected Attributes

string $cache_filename = '%feed.cache'
 

Detailed Description

News class from rss feed for galette

Author
Johan Cwiklinski johan.nosp@m.@x-t.nosp@m.nd.be

Constructor & Destructor Documentation

◆ __construct()

Galette\IO\News::__construct ( string  $url,
bool  $nocache = false 
)

Default constructor

Parameters
string$urlFeed URL
boolean$nocacheDo not try to cache

Member Function Documentation

◆ allowURLFOpen()

Galette\IO\News::allowURLFOpen ( )
protected

Check if allow_url_fopen is enabled

Returns
boolean

◆ cacheLoaded()

Galette\IO\News::cacheLoaded ( mixed  $contents)
protected

Called once cache has been loaded.

Parameters
mixed$contentsContent from cache
Returns
bool

◆ getCacheFilename()

Galette\IO\News::getCacheFilename ( )
protected

Complete path to cache file

Returns
string

◆ getDataTocache()

Galette\IO\News::getDataTocache ( )
protected

Get data to cache

Returns
string

◆ getFeedURL()

Galette\IO\News::getFeedURL ( string  $url)

Get feed url, handle Galette website to check available langs

Parameters
string$urlRequested URL
Returns
string

◆ getPosts()

Galette\IO\News::getPosts ( )

Get posts

Returns
array<int, array<string, string>>

◆ prepareForCache()

Galette\IO\News::prepareForCache ( )
protected

Ensure data to cache are present

Returns
void

The documentation for this class was generated from the following file: