Detailed Description
Class creates RSS-feeds.
- Author
- Dodonov A.A.
Definition at line 26 of file rss.php.
Constructor & Destructor Documentation
Constructor.
- Exceptions
-
| Exception | An exception of this type is thrown. |
- Author
- Dodonov A.A.
Definition at line 60 of file rss.php.
{
try
{
$this->AutoMarkup =
get_package(
'page::page_parts' ,
'last' , __FILE__ );
$this->CachedMultyFS =
get_package(
'cached_multy_fs' ,
'last' , __FILE__ );
$this->Database =
get_package(
'database' ,
'last' , __FILE__ );
$this->PageComposer =
get_package(
'page::page_composer' ,
'last' , __FILE__ );
$this->Security =
get_package(
'security' ,
'last' , __FILE__ );
$this->String =
get_package(
'string' ,
'last' , __FILE__ );
}
catch( Exception $e )
{
}
}
Member Function Documentation
| compile_feed |
( |
& |
$Records | ) |
|
Function compiles feed.
- Parameters
-
- Returns
- Compiled feed.
- Exceptions
-
| Exception | - An exception of this type is thrown. |
- Author
- Dodonov A.A.
Definition at line 189 of file rss.php.
{
try
{
$FeedXml = $this->compile_records( $Records );
$FeedXml = str_replace( '{last_build_date}' , date( 'r' ) , $FeedXml );
$FeedXml = str_replace(
'{package_path}' ,
_get_package_path(
'rss' ,
'2.0.0' ) , $FeedXml );
$this->Settings->load_file( dirname( __FILE__ ).'/conf/cf_default' );
$FeedXml = $this->String->print_record( $FeedXml , $this->Settings->get_raw_settings() );
$FeedXml = $this->AutoMarkup->compile_string( $FeedXml );
return( $FeedXml );
}
catch( Exception $e )
{
}
}
| compile_rss_button |
( |
& |
$Settings | ) |
|
Function processes macro 'rss_button'.
- Parameters
-
| $Str | - String to process. |
| $Changed | - true if any of the page's elements was compiled. |
- Returns
- array( Processed string , Was the string changed ).
- Exceptions
-
| Exception | - An exception of this type is thrown. |
- Author
- Dodonov A.A.
Definition at line 280 of file rss.php.
{
try
{
$Type =
$Settings->get_setting(
'type' ,
'small' );
$Code = $this->CachedMultyFS->get_template( __FILE__ , $Type.'_rss_button.tpl' );
$Code = $this->String->print_record( $Code ,
$Settings );
return( $Code );
}
catch( Exception $e )
{
}
}
Function returns data for feed.
- Returns
- Data.
- Exceptions
-
| Exception | - An exception of this type is thrown. |
- Author
- Dodonov A.A.
Definition at line 96 of file rss.php.
{
try
{
if( $this->Security->get_gp( 'feed' , 'set' ) === false )
{
return( false );
}
$Feed = $this->Security->get_gp( 'feed' , 'command' );
$FeedScript = $this->CachedMultyFS->get_data( __FILE__ , "$Feed.sql" );
$FeedScript = $this->AutoMarkup->compile_string( $FeedScript );
$Result = $this->Database->query( $FeedScript );
return( $this->Database->fetch_results( $Result ) );
}
catch( Exception $e )
{
}
}
Function generates feed.
- Parameters
-
| $Options | - Generatating options. |
- Exceptions
-
| Exception | - An exception of this type is thrown. |
- Author
- Dodonov A.A.
Definition at line 229 of file rss.php.
{
try
{
if( $Records === false )
{
return( false );
}
$Feed = $this->Security->get( $Feed , 'unsafe_string' );
header( "Content-Type: application/rss+xml" );
return( $Feed );
}
catch( Exception $e )
{
}
}
Field Documentation
Cached objects.
- Author
- Dodonov A.A.
Definition at line 38 of file rss.php.
The documentation for this class was generated from the following file: