osCSS_pdf Class Reference

List of all members.

Static Public Member Functions

Static Public Attributes

Static Protected Attributes

Private Member Functions

Static Private Member Functions

  • static filelang ()
    call file lang specific module

Detailed Description

Definition at line 12 of file osCSS_pdf.php.


Constructor & Destructor Documentation

osCSS_pdf::__construct (  )  [private]

PHP 5 Constructor.

Definition at line 34 of file osCSS_pdf.php.

00034                                 {
00035 
00036     define('BATCH_PRINT_INC', DIR_WS_MODULES . 'template_pdf/');
00037     define('BATCH_PDF_DIR', DIR_WS_INCLUDES . 'tmp/');
00038     define('FPDF_FONTPATH',DIR_FS_CATALOG.DIR_WS_COMMON_FONTS);
00039 
00040 
00041     require_once(DIR_FS_CATALOG.DIR_WS_COMMON_CLASSES.'fpdf.php');
00042     require_once(DIR_FS_CATALOG.DIR_WS_COMMON_FUNCTIONS.'pdf_output.php');
00043 
00044     define('LOGO_SHOP_FOR_PRINT',HTTP_SERVER.str_replace('//','/',STORE_LOGO_PRINT));
00045 
00046 //     tep_image(LOGO_SHOP_FOR_PRINT,'',150,150);
00047 
00048   }


Member Function Documentation

static osCSS_pdf::filelang (  )  [static, private]

call file lang specific module

BO

FO

Definition at line 66 of file osCSS_pdf.php.

Referenced by OutputInit().

00066                                     {
00067     global $oscss,$language;
00068 
00070     if(is_object($oscss))
00071       $oscss->pile_file_lang(DIR_FS_ADMIN.DIR_WS_LANGUAGES.$language.'/modules/template_pdf/'.self::$type.'.txt');
00072 
00074     global $page;
00075     if(is_object($page))
00076       if(($path=page::fix_file(DIR_WS_LANGUAGES . $language .'/modules/template_pdf/'.self::$type.'.txt',true)) !=false) $this->pile_file_lang($path);
00077   }

static osCSS_pdf::get_module ( pull_down = true  )  [static]

call module present for pdf

Parameters:
$pull_down boolean , format for pull down menu, or just array

Definition at line 121 of file osCSS_pdf.php.

00121                                                     {
00122     global $messageStack;
00123     if (!is_dir(BATCH_PRINT_INC)) $messageStack->add_session(sprintf(__("error problem opening directory %s  "),BATCH_PRINT_INC), 'error');
00124 
00125     $file_type_array = array();
00126     foreach(scan(BATCH_PRINT_INC) as $file) {
00127         $ext = strrchr($file, ".");
00128         if ($ext == ".php")
00129           if($pull_down) $file_type_array[] = array('id' => substr($file,0,-4),'text' => __('BP template '.str_replace(array('-'),array("_"),substr($file,0,-4))));
00130           else $file_type_array[] = substr($file,0,-4);
00131     }
00132     return $file_type_array;
00133   }

static osCSS_pdf::getInstance (  )  [static]

Definition at line 51 of file osCSS_pdf.php.

Referenced by resetInstance().

00051                                        {
00052       if(self::$_instance == null) {
00053     self::$_instance = new self();
00054       }
00055       return self::$_instance;
00056   }

osCSS_pdf::getPathModele (  )  [static]

return path module pdf

Definition at line 112 of file osCSS_pdf.php.

00112                                         {
00113     return DIR_WS_MODULES . 'template_pdf/' . self::$type.'.php';
00114   }

static osCSS_pdf::OutputAddPage (  )  [static]

Definition at line 97 of file osCSS_pdf.php.

00097                                         {
00098     if (self::$numPage > 0) self::$pdf->AddPage();
00099     self::$numPage++;
00100     return self::$numPage;
00101   }

static osCSS_pdf::OutputEnd (  )  [static]

Definition at line 103 of file osCSS_pdf.php.

00103                                     {
00104     $pdf_code = self::$pdf->output();
00105     exit;
00106   }

static osCSS_pdf::OutputInit ( type  )  [static]

init output pdf

Parameters:
type string name of template module pdf s

Definition at line 84 of file osCSS_pdf.php.

00084                                           {
00085     self::$type = $type;
00086 
00087     self::filelang();
00088 
00089     if($type=='labels')self::$pdf=new PDF_label();
00090     else self::$pdf=new PDF();
00091 
00092     self::$pdf->SetMargins(6,2,6);
00093 
00094     return self::$pdf;
00095   }

static osCSS_pdf::resetInstance (  )  [static]

Definition at line 58 of file osCSS_pdf.php.

00058                                          {
00059       self::$_instance = null;
00060       return self::getInstance();
00061   }


Member Data Documentation

osCSS_pdf::$_instance [static, protected]

Definition at line 14 of file osCSS_pdf.php.

osCSS_pdf::$numPage = 0 [static]

Definition at line 24 of file osCSS_pdf.php.

osCSS_pdf::$pdf [static]

Definition at line 29 of file osCSS_pdf.php.

osCSS_pdf::$type [static]

Definition at line 19 of file osCSS_pdf.php.

Referenced by OutputInit().


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