class VarStream
{
- // {{{ properties
-
// Stream handler to read from global variables
- var $varname;
- var $position;
-
- // }}}
- // {{{ stream_open
+ private $varname;
+ private $position;
function stream_open($path, $mode, $options, &$opened_path)
{
return true;
}
- // }}}
- // {{{ stream_close
-
function stream_close()
{
}
- // }}}
- // {{{ stream_read
-
function stream_read($count)
{
$ret = substr($GLOBALS[$this->varname], $this->position, $count);
return $ret;
}
- // }}}
- // {{{ stream_write
-
function stream_write($data)
{
$len = strlen($data);
$this->position += $len;
}
- // }}}
- // {{{ stream_eof
-
function stream_eof()
{
return $this->position >= strlen($GLOBALS[$this->varname]);
}
- // }}}
- // {{{ stream_tell
-
function stream_tell()
{
return $this->position;
}
- // }}}
- // {{{ stream_seek
-
function stream_seek($offs, $whence)
{
switch ($whence) {
return 0;
}
- // }}}
- // {{{ stream_flush
-
function stream_flush()
{
}
- // }}}
+ static function init()
+ {
+ stream_wrapper_register('var','VarStream');
+ }
}
-stream_wrapper_register('var','VarStream');
-
?>
{
global $page;
+ VarStream::init();
+
// calcul de la taille de l'image
- require_once dirname(__FILE__).'/../../classes/varstream.php';
$GLOBALS['photoreq'] = $_data;
$image_infos = getimagesize('var://photoreq');
unset ($GLOBALS['photoreq']);
define ('FPDF_FONTPATH', dirname(__FILE__).'/fonts/');
require_once '/usr/share/fpdf/fpdf.php';
-require_once dirname(__FILE__).'/../../classes/varstream.php';
+
+VarStream::init();
class ContactsPDF extends FPDF
{
- var $col = 0;
- var $y0;
+ public $title = "Mes contacts sur Polytechnique.org";
+
+ private $col = 0;
+ private $y0;
- var $title = "Mes contacts sur Polytechnique.org";
- var $broken = false;
- var $error = false;
+ private $broken = false;
+ private $error = false;
- var $report = 0;
+ private $report = 0;
function ContactsPDF()
{
return $self;
}
-
}
?>