Exponential Basic 2.4.0.1 Exponential Basic CMS — PHP Class Reference

ezsimplegenerator.php
Go to the documentation of this file.
1 <?php
3 //
4 // $Id: ezsimplegenerator.php 6206 2001-07-19 12:19:22Z jakobn $
5 //
6 // Definition of eZSimpleGenerator class
7 //
8 // Created on: <18-Oct-2000 15:55:16 bf>
9 //
10 // This source file is part of Exponential Basic, publishing software.
11 //
12 // Copyright (C) 1999-2001 eZ Systems. All rights reserved.
13 //
14 // This program is free software; you can redistribute it and/or
15 // modify it under the terms of the GNU General Public License
16 // as published by the Free Software Foundation; either version 2
17 // of the License, or (at your option) any later version.
18 //
19 // This program is distributed in the hope that it will be useful,
20 // but WITHOUT ANY WARRANTY; without even the implied warranty of
21 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 // GNU General Public License for more details.
23 //
24 // You should have received a copy of the GNU General Public License
25 // along with this program; if not, write to the Free Software
26 // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, US
27 //
28
31
37 class eZSimpleGenerator
38 {
42 function __construct( &$contents )
43 {
44 $this->Contents = $contents;
45 }
46
50 function &generateXML()
51 {
52 // add the XML header.
53
54 $newContents = "<?xml version=\"1.0\"?>";
55
56 //add the generator, this is used for rendering.
57 $newContents .= "<article><generator>simple</generator>\n";
58
59 //add the contents
60 $newContents .= "<intro>" . strip_tags( $this->Contents[0] ). "</intro>";
61
62 $newContents .= "<body>" . strip_tags( $this->Contents[1] ) . "</body></article>";
63
64 return $newContents;
65 }
66
70 function pageCount()
71 {
72 return 1;
73 }
74
75 var $Contents;
76 }
77
78 ?>
eZSimpleGenerator
Definition: ezsimplegenerator.php:38
eZSimpleGenerator\__construct
__construct(&$contents)
Definition: ezsimplegenerator.php:42
eZSimpleGenerator\pageCount
pageCount()
Definition: ezsimplegenerator.php:70
eZSimpleGenerator\$Contents
$Contents
Definition: ezsimplegenerator.php:75
eZSimpleGenerator\generateXML
& generateXML()
Definition: ezsimplegenerator.php:50
$contents
$contents
Definition: ezarticle/user/extendedsearch.php:52
Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.