page Class Reference

Inherited by AbstractAcaModule, and GabaritTemplate.

List of all members.

Public Member Functions

Static Public Member Functions

Public Attributes

Static Public Attributes

Static Protected Attributes

Private Member Functions

  • __construct ()
  • oscss_get_gabarit_template ()
    traite le nom de la page pour determine le gabarit utilisé Use drivers/page/
  • type_content ()
    determine le type de page (class de page) Use drivers/page/
  • draw_file_header ()
    Seul les variables global (GET,POST,etc) et l'object this sont accessible dans les fichiers appelé par cette fcuntion Fonction appelé dans le header des themes.
  • draw_file_footer ()
    Seul les variables global (GET,POST,etc) et l'object this sont accessible dans les fichiers appelé par cette fcuntion.
  • ret_var_page ($key)
    return var

Static Private Member Functions

Private Attributes

Static Private Attributes


Detailed Description

Definition at line 20 of file page.php.


Constructor & Destructor Documentation

page::__construct (  )  [private]

base page en cours

key cache file

Page necessitant une identifcation obligatoire

Page de devant pas être indéxe dans le fils d'arianne (breadcrumb)

Prise en charge cookie admin

Remarks:
call drivers modules

Reimplemented in categorieModule, contentModule, productModule, account, generic, home, and listingModule.

Definition at line 85 of file page.php.

00085                                 {
00086     $this->ext='.php';
00087     $this->page['var']['develop']  ='false';
00088     $this->page['header']['file']=array();
00089     $this->page['footer']['file']=array();
00090     $this->page['modules']=array();
00091     $this->page['plugins']=array();
00092     $this->page['boxes']=array();
00093     $this->page['type']='none';
00094     $this->page['content']=FILENAME_DEFAULT;
00095     $this->page['class']='none';
00096     $this->page['script']='';
00097 
00098     $this->PileFileLang=array();
00099 
00100     self::$CacheCalcul=(isset($_GET['cache']) && $_GET['cache']=='calcul')? true :false;
00101 
00105 //     $b=basename($_SERVER['REQUEST_URI']);
00106     $b=basename($_SERVER['SCRIPT_NAME']) . (( ($quey_string=tep_get_all_get_params(array('cache','page'))) !='')? '?'.$quey_string : '')  ;
00107     self::$keyCacheName=md5($b);
00108 
00110     self::$objCache = new osCSS_Cache;
00111     if(self::$CacheCalcul) self::$objCache->clear('Global-'.self::$keyCacheName);
00112     if (self::$objCache->read('Global-'.self::$keyCacheName) )  self::$GlobalCache= self::$objCache->getCache();
00113 
00114     self::$GlobalCache['page_courante']= $b;
00118     /* Noyau */
00119     $this->file_registered=array(
00120                 FILENAME_ACCOUNT,FILENAME_ADDRESS_BOOK,FILENAME_ADDRESS_BOOK_PROCESS,FILENAME_CHECKOUT_PAYMENT_ADDRESS,FILENAME_CHECKOUT_PAYMENT,FILENAME_CHECKOUT_SHIPPING,FILENAME_CHECKOUT_CONFIRMATION,FILENAME_CHECKOUT_SHIPPING_ADDRESS,FILENAME_LOGIN,FILENAME_PASSWORD_FORGOTTEN
00121     );
00122     /* module, hack */
00123     if(defined('FILENAME_RETURN')) {
00124       $this->file_registered[]=FILENAME_RETURN;
00125       $this->file_registered[]=FILENAME_RETURNS_TRACK;
00126     }
00130     $this->file_not_breadcrumb[]='';
00131 
00135     self::$CookieAdmin =(isset($_COOKIE['oscss_admin']))? true : false ;
00136 
00137 
00141 //     require_once(self::PATH_DRIVERS_PAGE.PUBLIC_DRIVERS_PAGE.'.php');
00142   }


Member Function Documentation

page::_call ( key_object,
funct 
)

Appel public des function de chargeur des extensions !! Not method Static.

Parameters:
$key_object string object key de l'obj (ex 'dsrte' pour la class 'dsrte_oscss' ) Cet arguement peut être hommis dans la mesure ou il est identique à l'appel précédent (permanence du dernier object appelé)
$funct string $function de construction block (_top, _head, _draw) all tous les arguement a passer à la function

Definition at line 588 of file page.php.

00588                                             {
00589 
00590     $object=$key_object;
00591     $vars='';
00592     if(func_num_args()>2) {
00593       for($i=2;$i<(func_num_args()-1);$i++){
00594         $t[$i] = func_get_arg($i);
00595         $vars.="\$t[$i],";
00596       }
00597       $t[$i] = func_get_arg($i);
00598       $vars.="\$t[$i]";
00599     }
00600 
00601     if(!isset($this->$object))
00602       trigger_error(__CLASS__.'object:page (lg'.__LINE__.'):: Error class introuvable: '.(string)$key_object , E_USER_ERROR);
00603     elseif(!method_exists($key_object,$funct)){
00604       trigger_error(__CLASS__.' (lg'.__LINE__.'):: class '.(string)$key_object.' function introuvable: '.(string)$funct , E_USER_ERROR);
00605       return false;
00606     }
00607 
00608     if ($vars !='') {
00609       eval("\$ret = \$this->\$object->$funct($vars);");
00610       return  $ret;
00611     }
00612     else return $this->$object->$funct();
00613   }

page::_conf_value ( string  ) 

Charge la valeur de la constante,en reference, uniquement si elle n'as pas ete redéfini par le template.

Parameters:
[in] $string string Nom constante de reference [out] self this->var[]
Returns:
string

Definition at line 534 of file page.php.

00534                                       {
00535     if (empty($string)) return false;
00536     $key=strtoupper($string);
00537     if (isset($this->page['var'][$key]) and  is_string($this->page['var'][$key]) ) return $this->page['var'][$key];
00538     elseif (!isset($this->page['var'][$key])) return tep_cst_define($key);
00539     else return false;
00540   }

page::_draw_in_page ( string  ) 

Charge un element dans la page, si var ou cst bool defini.

Parameters:
[in] $string string Nom constante de reference [out] $this object this->var[]
Returns:
boolean

Definition at line 520 of file page.php.

00520                                         {
00521     if (empty($string)) return false;
00522     $key=strtoupper($string);
00523     if (isset($this->page['var'][$key]) and ( (is_string($this->page['var'][$key]) && strtoupper($this->page['var'][$key])=='TRUE')||( is_bool($this->page['var'][$key]) && $this->page['var'][$key]==TRUE) )) return true;
00524     elseif (!isset($this->page['var'][$key])) return _cst_bool($key);
00525     else return false;
00526   }

page::add_file_footer ( file,
option = '' 
)

Ajoute un ficher au chageur du header,ces elements seront ensuite chargé dans le header.

Parameters:
$file string : path+non de fichier a charger
$option array : les option supp key/value

Definition at line 778 of file page.php.

00778                                                    {
00779     $option=(is_array($option))? $option : array();
00780     $sort=(isset($option['sort']))? $option['sort']*10 :5*10;
00781     $sort=(($sort+(count($this->page['footer']['file']))));
00782 
00783     $this->page['footer']['file'][$sort]=array_merge(array('file'=>$file),$option);
00784   }

page::add_file_header ( file,
option = '' 
)

Definition at line 764 of file page.php.

00764                                                    {
00765     $option=(is_array($option))? $option : array();
00766     $sort=(isset($option['sort']))? $option['sort']*10 :5*10;
00767     $sort=(($sort+(count($this->page['header']['file']))));
00768 
00769     $this->page['header']['file'][$sort]=array_merge(array('file'=>$file),$option);
00770   }

page::add_object ( name,
object 
)

Add d'un objet à l'objet this.

Definition at line 578 of file page.php.

Referenced by post_init().

00578 { return (!is_object($object)) ? false : $this->$name= $object ; }

page::add_var_page ( key,
value = '' 
)

Add des var.

Parameters:
$key string
$value string/array/int

Definition at line 499 of file page.php.

Referenced by tep_get_header().

00499                                               {
00500     if (empty($key)) return false;
00501     $this->page['var'][$key]=$value;
00502   }

page::AddCacheVar ( pile,
name,
var 
) [static]
Parameters:
$pile string
$name string
$var array/string ex page::AddCacheVar('boxes',$key,$array);

Definition at line 173 of file page.php.

Referenced by oscss_boxes::in_cache(), and oscss_plugins::testCache().

00173                                                         {
00174     self::$GlobalCache[$pile][$name]=$var;
00175   }

page::cache_lang ( load = true  ) 

Appelé en debut et fin d'appli Charge et stock le cache des fichier de lang en .txt.

Note:
Specifique au .txt

instance cache

Definition at line 262 of file page.php.

00262                                         {
00263     global $lang,$languages_id;
00265     $osCSS_Cache = new osCSS_Cache;
00266     if(self::$CacheCalcul)$osCSS_Cache->clear('fo_lang-'.$languages_id.'-'.self::$keyCacheName);
00267     $osCSS_Cache->read('fo_lang-'.$languages_id.'-'.self::$keyCacheName);
00268     if($load){
00269       $res= $osCSS_Cache->getCache();
00270       global $lang;
00271       $lang=$res['lang'];
00272       $this->PileFileLang=$res['PileFile'];
00273     } else{
00274       $pilefile=array();
00275       foreach(get_included_files() as $e)
00276         if(substr($e,-3)=='txt') $pilefile[]=$e;
00277 
00278       if(count($pilefile)>0) {
00279         $variable = array('lang'=>$lang,'PileFile'=>array_merge($pilefile,(array)$this->PileFileLang) );
00280         $osCSS_Cache->writeBuffer($variable);
00281       }
00282     }
00283   }

page::debugg ( precis = ''  ) 

display error

Parameters:
$precis string

Definition at line 973 of file page.php.

00973                                     {
00974     if (tep_not_null($precis) && isset($this->$precis)) print_r($this->$precis);
00975     else print_r($this/*->page*/);
00976   }

page::develop (  ) 

Panneau lateral debugg.

Note:
: cf config du theme, var debugg

Definition at line 963 of file page.php.

Referenced by tep_get_footer().

00963                            {
00964     $this->new_class('develop');
00965     $this->develop->draw_block();
00966   }

page::draw_breadcrumb ( caract = ' &raquo; '  ) 

Sortie menu breadcrumb.

Parameters:
$caract string caratére entre les items

Definition at line 644 of file page.php.

00644 { return $this->breadcrumb->trail($caract); }

page::draw_file_footer (  )  [private]

Seul les variables global (GET,POST,etc) et l'object this sont accessible dans les fichiers appelé par cette fcuntion.

Definition at line 361 of file page.php.

00361                                      {
00362     if(isset($this->page['footer']['file'])){
00363       $files=$this->page['footer']['file'];
00364       ksort($files);
00365       foreach($files as $key=>$values) tep_include_file($values['file']);
00366     }
00367   }

page::draw_file_header (  )  [private]

Seul les variables global (GET,POST,etc) et l'object this sont accessible dans les fichiers appelé par cette fcuntion Fonction appelé dans le header des themes.

Recherche des fichier dans include/js et chargement des fichier specique au content

Definition at line 315 of file page.php.

00315                                      {
00316 
00317     $page=$this;
00318     $language=$this->page['language'];
00319     $PHP_SELF=$this->page['content'];
00320     $template=$this->page['template'];
00321     $current_category_id=$this->ret_var_page('current_category_id');
00322     $languages_id=$this->ret_var_page('languages_id');
00323 
00324 //     $init_theme=$this->getPathTemplate()   .'cfg/init.php';
00325     $init_theme=call_user_func(array(PUBLIC_DRIVERS_PAGE,'GetInit'));
00326     if(self::TestFile($init_theme)) include($init_theme);
00327 
00328     /* chargement des js en sortie*/
00329     $this->javascript->cstr_header();
00330 
00331     if( ($name=$page->the_type()) && ($page->return_object($name) !=false) ) {
00332       $class=$page->return_object($name);
00333       if(method_exists($class, 'get_header' )) $class->get_header();
00334     }
00335 
00336     if(isset($this->page['header']['file'])){
00337       $files=$this->page['header']['file'];
00338       ksort($files);
00339       foreach($files as $key=>$values) tep_include_file($values['file']);
00340     }
00341     print $this->javascript->init_prepa();
00342 
00343     if(isset($this->page['header']['script'])) {
00344       $files=$this->page['header']['script'];
00345       ksort($files);
00346       foreach($files as $key=>$values) print $values['script'];
00347     }
00348 
00352     $file=DIR_WS_INCLUDES.'js/'.$this->page_content_clean().'.js.php';
00353       if( ($file=self::fix_file($file)) && $file !=false ) tep_include_file($file);
00354   }

page::fix_file ( path,
lg = false,
core = NULL 
) [static]

Surclasse les fichiers du core par ceux du template Boxe, module, content, class, etc.

Parameters:
$path string path
$lg boolean lg mode language
$core boolean core force fichier du core
Returns:
path

Definition at line 215 of file page.php.

Referenced by address_book::__construct(), osCSS_pdf::filelang(), tep_get_include_contents(), and tep_post_prepare_email().

00215                                                                {
00216     global $page;
00217     $doublon=array();
00218     static $doublon;
00219     $sortie=NULL;
00220     $file=basename($path);
00221     $path=dirname($path);
00222     $path.=(!preg_match("#.*/$#",$path))?'/':'';
00223     $file_path=(substr($path,0,strlen(DIR_FS_CATALOG)) ==DIR_FS_CATALOG)? substr($path,strlen(DIR_FS_CATALOG)) : $path;
00224     $file_path=(substr($file_path,0,strlen( tep_get_http())) == tep_get_http())? substr($file_path,strlen( tep_get_http())) : $file_path;
00225     $path_template=DIR_WS_TEMPLATES . (isset($page->page['template'])? $page->page['template'] : TEMPLATE_NAME ) .'/';
00226 
00227     if($lg && $file=substr($file,0,-4) ) {
00228       if($core==NULL || $core==false)
00229         foreach( array('txt','php') as $ext_lg)
00230           if( ($s=$path_template.$file_path.$file.'.'.$ext_lg) && self::TestFile($s) && !in_array($s,(array)$doublon))  $sortie= $s;
00231 
00232       if($sortie==NULL)
00233         foreach( array('txt','php') as $ext_lg)
00234           if( ($s=$path.$file.'.'.$ext_lg) && self::TestFile($s) && !in_array($s,(array)$doublon))  $sortie= $s;
00235     }
00236     else {
00237       if( ($s=$path_template.$file_path.$file) && self::TestFile($s) && !in_array($s,(array)$doublon))  $sortie= $s;
00238       elseif( ($s=$path.$file) && self::TestFile($s) && !in_array($s,(array)$doublon) )  $sortie= $s;
00239     }
00240     $doublon[]=$sortie;
00241 
00242     return ($sortie!=NULL)? $sortie : false;
00243   }

page::force_content ( p_content  ) 

Force un contenu,qui n'est pas celui herité du fichier de la racine de la boutique.

Parameters:
$p_content string

Definition at line 482 of file page.php.

00482                                            {
00483     $this->page['content']=trim($p_content);
00484     $this->type_content();
00485   }

page::force_gabarit ( gabarit  ) 

Force un gabarit, qui detremine le choix du gabarit de page.

Parameters:
$gabarit string

Definition at line 491 of file page.php.

00491 { $this->page['gabarit']=trim($gabarit); }

page::GetCacheVar (  )  [static]

Definition at line 162 of file page.php.

Referenced by oscss_plugins::gocache(), oscss_boxes::in_cache(), and oscss_plugins::testCache().

00162                                       {
00163     return self::$GlobalCache;
00164   }

page::getPathTemplate (  ) 

Return path tmplate courant.

Definition at line 465 of file page.php.

Referenced by init(), path_gabarit(), and post_init().

00465                                    {
00466     return DIR_WS_TEMPLATES . $this->page['template'] .'/';
00467   }

page::init ( p_content,
language 
)

fonction qui doit être appelé par le fichier à la racine de la boutique juste apres le application_top Le fichier de langue principal est chargée, priorité a cleui du template

Parameters:
$p_content 
$language 

activ class aca generic

Definition at line 391 of file page.php.

00391                                             {
00392     $this->page['script']=$p_content;
00393     $this->page['content']=trim($p_content);
00394     $this->page['language']=$language;
00395     $this->type_content();
00396     $page=$this;
00397 
00398     /* Init class gestion js */
00399     $this->new_class('javascript');
00400 
00401     /* Appel fichier langue specifique page */
00402     if(($path=self::fix_file(DIR_WS_LANGUAGES . $language . '/' . $this->page['content'],true)) !=false) $this->pile_file_lang($path);
00403     elseif(($path=self::fix_file(DIR_WS_LANGUAGES .  'fr_FR/' . $this->page['content'],true)) !=false) $this->pile_file_lang($path);
00404 
00405     $path_template=$this->getPathTemplate() ;
00406     if (self::TestFile($path_template.DIR_WS_INCLUDES .'lib.functions.theme.php' )) require_once($path_template .DIR_WS_INCLUDES .'lib.functions.theme.php');
00407 
00409     $aca=$this->new_class('generic');
00410     $aca=generic::getInstance();
00411     $res=$aca->check_action('',@$_GET['action']);
00412   }

page::is_page_here ( page  ) 

retour de vrai si page passé en argument et equal à page content en cours

Parameters:
[in] $page string nom de la page en cours (sans extension) [out] $page = object this string page_content_clean
Returns:
boolean

Definition at line 738 of file page.php.

00738                                      {
00739     if ( (substr($page,strlen($page)-4,strlen($page))==$this->ext) && ($this->page_content() == $page) )return true;
00740     elseif ( (substr($page,0,-4)==$this->ext) && ($this->page_content_clean() == $page) )return true;
00741     else return false;
00742   }

page::is_page_type ( type  ) 
Parameters:
$type string/array
Returns:
boolean

Definition at line 729 of file page.php.

00729 { return ( (is_array($type) && in_array($this->page['type'],$type)) || ($type ==$this->page['type']) ) ? true : false ; }

page::is_registered (  ) 

control identification

Definition at line 717 of file page.php.

00717                                  {
00718     if (!tep_session_is_registered('customer_id')) {
00719 //       $this->navigation_history->set_snapshot();
00720       tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL'));
00721     }
00722   }

page::new_class ( class  ) 

Ajout d'un objet par l'appel de son fichier.

Parameters:
$class string

Definition at line 547 of file page.php.

Referenced by develop(), init(), and post_init().

00547                                    {
00548     if (!class_exists($class)) return false;
00549     if (isset($this->$class))return $this->$class;
00550     global $page;
00551     $vars = '';
00552     if(func_num_args()>1) {
00553       for($i=1;$i<(func_num_args()-1);$i++){
00554         $t[$i] = func_get_arg($i);
00555         $vars.="\$t[$i],";
00556       }
00557       $t[$i] = func_get_arg($i);
00558       $vars.="\$t[$i]";
00559     }
00560 
00561     if(!is_callable(array($class,'getInstance')))eval("\$ret=\$this->$class= new $class($vars);");
00562     else  eval("\$ret=\$this->$class=$class::getInstance($vars);");
00563 
00564     return $this->$class;
00565   }

page::oscss_body_id (  ) 
Note:
Get the boxes

Definition at line 711 of file page.php.

00711 { return 'Page_'.substr($this->page['content'],0,-4); }

page::oscss_content (  ) 

Scan template content folders and display template content if exist, if not display default oscss content.

Definition at line 620 of file page.php.

00620                                   {
00621     return call_user_func(array(PUBLIC_DRIVERS_PAGE,'GetPageContent'));
00622   }

page::oscss_get_gabarit_template (  )  [private]

traite le nom de la page pour determine le gabarit utilisé Use drivers/page/

Definition at line 192 of file page.php.

Referenced by post_init().

00192                                                 {
00193     return call_user_func(array(PUBLIC_DRIVERS_PAGE,'GetGabaritTemplate'));
00194   }

static page::oscss_get_template (  )  [static, private]

retour du nom du template

Definition at line 180 of file page.php.

Referenced by pre_init().

00180                                                {
00181     if(!defined('TEMPLATE_NAME')) die(__('FATAL ERROR: no template defined !'));
00182     elseif(!is_dir(DIR_WS_TEMPLATES . TEMPLATE_NAME) )  die(__('FATAL ERROR: the template directory do not exist!'));
00183     else return TEMPLATE_NAME;
00184   }

page::page_content (  ) 

Definition at line 627 of file page.php.

Referenced by is_page_here().

00627 { return $this->page['content']; }

page::page_content_clean (  ) 

Definition at line 632 of file page.php.

Referenced by draw_file_header(), and is_page_here().

00632 { return substr($this->page['content'],0,strlen($this->page['content'])-strlen($this->ext)); }

page::path_gabarit (  ) 

Definition at line 637 of file page.php.

00637 { return $this->getPathTemplate().$this->page['gabarit']; }

page::pile_file_lang ( path_file  ) 

Chargeur de fichier de langues.

Note:
Specifique au .txt

Definition at line 249 of file page.php.

Referenced by init(), and tep_get_header().

00249                                             {
00250     global $lang;
00251     if(substr($path_file,0,strlen(DIR_FS_CATALOG)) !=DIR_FS_CATALOG) $path_file= DIR_FS_CATALOG.$path_file;
00252 
00253     if(!in_array($path_file,(array)$this->PileFileLang))
00254       include_once($path_file);
00255   }

page::pos_init ( type,
pile,
array 
)

Init pile pour navigation dans la pile avec next, prev.

Parameters:
$type string (modules/boxes/plugins)
$pile string nom de la pile
$array string $array (contenu de la pile)

Definition at line 935 of file page.php.

00935                                                {
00936     if(!isset($this->position[$type][$pile])){
00937       $this->position[$type][$pile]=(array)$array;
00938       $this->position_[$type][$pile]['max']=count($array);
00939       $this->position_[$type][$pile]['current']=0;
00940     }else return false;
00941   }

page::pos_next ( type,
pile 
)

deplacement dans la pile

Parameters:
$type string (modules/boxes/plugins)
$pile string nom de la pile

Definition at line 949 of file page.php.

00949                                        {
00950     if(isset($this->position[$type][$pile])){
00951       if($this->position_[$type][$pile]['current']>0 && $this->position_[$type][$pile]['current']<=$this->position_[$type][$pile]['max'])  next($this->position[$type][$pile]);
00952       $this->position_[$type][$pile]['current']++;
00953       return key($this->position[$type][$pile]);
00954     }
00955   }

page::post_init ( bread = true  ) 
Note:
fonction qui doit être appelé par le fichier à la racine de la boutique juste avant l'appel a require(path_gabarit());
Parameters:
$bread bool

Class specifique type de page

Init du theme

! recup elements des plugins

fil rouge

Class permanente

Definition at line 420 of file page.php.

00420                                         {
00421 
00422     $this->new_class('oscss_plugins');
00423     $this->new_class('categorie');
00425     if (in_array($this->the_type(),explode(',',PUBLIC_PAGE_TYPE))){
00426       global $ACA;
00427       if($this->new_class($this->the_type(),true) !=false) {
00428         $this->new_class($this->the_type(),true);
00429         $ACA = $this->return_object($this->the_type());
00430       }
00431       else{
00432         new AcaFactory($this->the_type());
00433         $ACA =$this->add_object($this->the_type(), new AcaFactory($this->the_type()) );
00434   //       $this->new_class($this->the_type(),true);
00435         $ACA = $this->return_object($this->the_type());
00436       }
00437     }
00439       $this->oscss_get_gabarit_template();
00441     $this->page['plugins']['present']=$this->oscss_plugins->plugins_active('generic');
00442 
00443     if(self::TestFile($this->getPathTemplate()   . DIR_WS_INCLUDES. 'plugins/'.$this->the_type().'/'))
00444       $this->page['plugins']['type']=$this->oscss_plugins->plugins_active($this->the_type());
00445 
00447     if($bread) {
00448       if(($this->page['type']=='account')&& $this->page['script'] !=FILENAME_ACCOUNT )  $this->breadcrumb->add(NAVBAR_TITLE_1, tep_href_link(FILENAME_ACCOUNT, '', 'SSL'));
00449 
00450       if (!in_array($this->page['script'],$this->file_not_breadcrumb)) {
00451         $mode=(in_array($this->page['script'],$this->file_registered))? 'SSL': 'NONSSL';
00452         $this->title=(defined('NAVBAR_TITLE')) ? NAVBAR_TITLE: ((defined('NAVBAR_TITLE_2')) ? NAVBAR_TITLE_2 : NAVBAR_TITLE_1 );
00453         $this->breadcrumb->add($this->title, tep_href_link($this->page['script'], '',$mode));
00454       }
00455     }
00456 
00458     $this->new_class('oscss_modules');
00459     $this->new_class('oscss_boxes');
00460   }

page::pre_init (  ) 
Note:
fonction qui doit être appelé dans le application_top

Definition at line 374 of file page.php.

00374                             {
00375     $this->breadcrumb->add(HEADER_TITLE_TOP,  tep_get_httpdir() );
00376     $this->breadcrumb->add(HEADER_TITLE_CATALOG, tep_href_link(FILENAME_DEFAULT));
00377 
00378     // set the template
00379     $this->page['template'] = page::oscss_get_template();
00380 
00381   }

page::prop_ctrl ( db_key,
value = '' 
)

Definition at line 752 of file page.php.

00752                                                {
00753     if(isset($this->propriete[$db_key]) && in_array($this->page['type'],explode(',',$this->propriete[$db_key]['class_page'])) )
00754       if(isset($this->propriete[$db_key]['replace'])) return $this->propriete[$db_key]['replace'];
00755   }

page::ret_messageStack (  ) 

Definition at line 649 of file page.php.

00649 { return $this->messageStack; }

page::ret_page_type (  ) 

alias the_type() string page['type'] type page (account, checkout, adresse, product);

Definition at line 693 of file page.php.

00693 { return $this->the_type() ;}

page::ret_template (  ) 

Definition at line 654 of file page.php.

00654 { return $this->page['template'] ; }

page::ret_var_page ( key  )  [private]

return var

Parameters:
$key string

Definition at line 508 of file page.php.

Referenced by draw_file_header(), tep_get_header(), tep_get_sidebar(), and the_var().

00508                                      {
00509     if (empty($key) || !isset($this->page['var'][$key])) return false;
00510     return $this->page['var'][$key];
00511   }

page::return_object ( class  ) 
Parameters:
$class string
Returns:
object

Definition at line 573 of file page.php.

Referenced by post_init().

00573 { return (isset($this->$class)) ? $this->$class : false ; }

page::StopCacheVar (  )  [static]

Stock mise en cache var et element de page.

Definition at line 155 of file page.php.

00155                                        {
00156     self::$objCache->writeBuffer(self::$GlobalCache);
00157   }

page::tep_get_footer (  ) 

draw footer

Boxes shearch fonction xxxx_force_box()

Definition at line 903 of file page.php.

00903                                   {
00904     $page=$this;
00905     if ($this->page['var']['develop']=='true') $this->develop();
00906 
00907     $plugins=$this->the_var('plugins');
00908     while($r=each($plugins)){
00913 //       $fct=$r['value'].'_init_scripts_footer';
00914 //       if (function_exists($fct)){
00915 //         $this->page['boxes']['list']=array_merge($this->page['boxes']['list'],$fct());
00916 //       }
00917 
00918       $fct=$r['value'].'_init_scripts_footer';
00919       if (function_exists($fct)){
00920         $this->javascript->add_multi($fct());
00921       }
00922     }
00923     $file=call_user_func(array(PUBLIC_DRIVERS_PAGE,'GetFooter'));
00924     if(self::TestFile($file)) require_once($file);
00925   }

page::tep_get_header (  ) 

draw header

report des var d'enviroennement

Langue specifique au template

Note:
specifique text __()

Chargement des module actifs

Boxes shearch fonction xxxx_force_box()

propriete shearch fonction xxxx_add_propriete()

Chargement des scritps shearch fonction xxxx_scripts() (librairie) shearch fonction xxxx_init_scripts() (exec Or inline )

Gestion des tag, title et key

Definition at line 792 of file page.php.

00792                                   {
00794     global $lang;
00795 
00796     $page=$this;
00797     $language=$this->page['language'];
00798     $PHP_SELF=$this->page['content'];
00799     $template=$this->page['template'];
00800     $current_category_id=$this->ret_var_page('current_category_id');
00801     $languages_id=$this->ret_var_page('languages_id');
00802 
00807     if(($path=self::fix_file(DIR_WS_LANGUAGES . $language.'.php' ,true)) !=false) $this->pile_file_lang($path);
00808     elseif(($path=self::fix_file(DIR_WS_LANGUAGES . 'fr_FR.php' ,true)) !=false) $this->pile_file_lang($path);
00809 
00813     $this->oscss_plugins->active_plugins();
00814     $plugins=(isset($this->page['plugins']['actif']))?$this->page['plugins']['actif']:array();
00815     $this->add_var_page('plugins',$plugins);
00816     while($r=each($plugins)){
00821       $fct=$r['value'].'_force_box';
00822       if (function_exists($fct)){
00823         $this->page['boxes']['list']=array_merge($this->page['boxes']['list'],$fct());
00824       }
00825 
00830       $fct=$r['value'].'_add_propriete';
00831       if (function_exists($fct)){
00832         $this->propriete=array_merge($this->propriete,$fct());
00833       }
00834 
00840       $fct=$r['value'].'_scripts';
00841       if (function_exists($fct)){
00842         $this->javascript->add_multi($fct());
00843       }
00844       $fct=$r['value'].'_init_scripts';
00845       if (function_exists($fct)){
00846         $this->javascript->add_multi($fct());
00847       }
00848     }
00849 
00853       if (_cst_bool('SEO_ENABLED')){
00854         $seo_urls=seo_url::getInstance($languages_id);
00855         $seo_urls->header_tags(substr($_SERVER['SCRIPT_NAME'],strlen(DIR_WS_CATALOG) ), $_SERVER['QUERY_STRING']);
00856         $the_title= $seo_urls->header_tag['title'];
00857         $the_desc= $seo_urls->header_tag['desc'];
00858         $the_key_words= $seo_urls->header_tag['keywords'];
00859       }else {
00860         $the_desc= HEAD_DESC_TAG_ALL;
00861         $the_key_words= HEAD_KEY_TAG_ALL;
00862         $the_title='';
00863       }
00864       $this->page['the_title']=(tep_not_null($the_title)? $the_title : (tep_not_null($this->title)? $this->title: STORE_NAME));
00865 
00866     $file=call_user_func(array(PUBLIC_DRIVERS_PAGE,'GetHeader'));
00867     if(self::TestFile($file)) include($file);
00868 
00871     if(self::$CookieAdmin)
00872       echo '<div class="osCSS_Admin" style="position:absolute; right:20px; top:0;">'.
00873 //          '<a href="'.tep_href_link(substr($_SERVER['SCRIPT_NAME'],strlen(DIR_WS_CATALOG) ), tep_get_all_get_params(array('cache')).'cache=calcul').'">Recalculer page</a> '.
00874             '<a href="'.tep_href_link(substr($_SERVER['SCRIPT_NAME'],strlen(DIR_WS_CATALOG) ), tep_get_all_get_params(array('cache')).'cache=calcul').'">Recalculer page</a> '.
00875            '</div>';
00876   }

page::tep_get_sidebar ( bar = 'sidebar'  ) 

draw sidebar

Parameters:
$bar string bar le nom du fichier a inclure (par defaut sidebar) sans extension

Definition at line 884 of file page.php.

00884                                                  {
00885     // report des var d'enviroennement
00886     $page=$this;
00887     $language=$this->page['language'];
00888     $PHP_SELF=$this->page['content'];
00889     $template=$this->page['template'];
00890     $current_category_id=$this->ret_var_page('current_category_id');
00891     $languages_id=$this->ret_var_page('languages_id');
00892     $currencies=$page->currencies;
00893     $request_type=$page->ret_var_page('request_type');
00894 
00895     $file=call_user_func(array(PUBLIC_DRIVERS_PAGE,'GetSidebar'),$bar);
00896     if(self::TestFile($file)) require_once($file);
00897   }

page::tep_session_close (  ) 

femeture de session

Definition at line 472 of file page.php.

00472                                      {
00473     $navigation=navigation_history::getInstance();
00474     $navigation->set_close();
00475     tep_session_close();
00476 }

page::TestFile ( file  )  [static]

test si fichier existe et cache du test enregsitrement a la volee

Returns:
boolean

Definition at line 291 of file page.php.

Referenced by oscss_plugins::active_plugins(), oscss_boxes::boxes(), fix_file(), oscss_modules::modules(), oscss_modules::tep_call_modules(), and tep_post_prepare_email().

00291                                         {
00292     $keytemp=md5($file);
00293     $result=self::Testfile_exists($file,$keytemp);
00294     return _test_bool($result);
00295   }

page::Testfile_exists ( file,
keytemp 
) [static, private]
Parameters:
$file 
$keytemp 

Definition at line 302 of file page.php.

Referenced by TestFile().

00302                                                          {
00303     if(isset(self::$GlobalCache['PileFile'][$keytemp])) return self::$GlobalCache['PileFile'][$keytemp];
00304     elseif(file_exists($file)) return self::$GlobalCache['PileFile'][$keytemp]='true';
00305     else return self::$GlobalCache['PileFile'][$keytemp]='false';
00306   }

page::the_content ( court = false  ) 

Nom du content.

Definition at line 686 of file page.php.

00686 { return (!$court) ? $this->page['content'] : substr($this->page['content'],0,  -strlen($this->ext) ) ; }

page::the_script (  ) 

Nom de la page.

Definition at line 666 of file page.php.

00666 { return $this->page['script'] ; }

page::the_template (  ) 

Nom du template.

Definition at line 680 of file page.php.

00680 { return $this->page['template']; }

page::the_title (  ) 

Nom de la page.

Definition at line 660 of file page.php.

00660 { return $this->page['the_title'] ; }

page::the_type (  ) 

retourne le type de page

Definition at line 699 of file page.php.

Referenced by post_init(), and ret_page_type().

00699 { return (isset($this->page['type'])? $this->page['type'] : 'none') ; }

page::the_typeClass (  ) 

retourne le type class de page

Definition at line 705 of file page.php.

00705 { return (isset($this->page['class'])? $this->page['class'] : 'none') ; }

page::the_var ( key  ) 

return var if exist

Parameters:
$key string nom de la variable
Returns:
value/false

Definition at line 674 of file page.php.

Referenced by tep_get_footer().

00674 { return $this->ret_var_page($key); }

page::type_content (  )  [private]

determine le type de page (class de page) Use drivers/page/

Definition at line 201 of file page.php.

Referenced by force_content(), and init().

00201                                  {
00202     return call_user_func(array(PUBLIC_DRIVERS_PAGE,'GetTypeContent'));
00203   }


Member Data Documentation

page::$_instance [static, protected]

Reimplemented in categorieModule, contentModule, productModule, account, generic, home, listingModule, payment, and shipping.

Definition at line 81 of file page.php.

page::$CacheCalcul [static]

bool recalcul mode public

Definition at line 77 of file page.php.

page::$CookieAdmin [static, private]

bool admin liaison base

Definition at line 67 of file page.php.

page::$currencies
page::$file_registered [private]

Definition at line 79 of file page.php.

page::$GlobalCache = array() [static, protected]

Array cache global.

Definition at line 57 of file page.php.

page::$keyCacheName [static]

string res md5 url en cours public

Definition at line 72 of file page.php.

Referenced by oscss_plugins::active_plugins().

page::$objCache [static, private]

object cache global

Definition at line 62 of file page.php.

page::$oscss_boxes

Definition at line 30 of file page.php.

page::$page

Definition at line 28 of file page.php.

Referenced by listingModule::__construct(), home::__construct(), generic::__construct(), account::__construct(), productModule::__construct(), contentModule::__construct(), categorieModule::__construct(), checkout_process::__construct(), order_total::_extents(), checkout_process::after_process(), checkout_process::before_process(), home::display_alaune(), home::display_view(), generic::display_view(), account::display_view(), productModule::display_view(), categorieModule::display_view(), account::display_view_button_action(), listingModule::display_view_min(), home::display_view_min(), generic::display_view_min(), account::display_view_min(), productModule::display_view_min(), contentModule::display_view_min(), categorieModule::display_view_min(), account::display_view_public(), order_total::draw_cart(), AbstractAcaModule::draw_ele_modules(), draw_file_header(), fix_file(), account::get_header(), GabaritTemplate::GetFooter(), GabaritTemplate::GetGabaritTemplate(), GabaritTemplate::GetHeader(), GabaritTemplate::GetInit(), GabaritTemplate::GetPageContent(), GabaritTemplate::GetSidebar(), GabaritTemplate::GetTypeContent(), checkout_process::in_process_finish(), checkout_process::in_process_order(), checkout_process::in_process_products(), init(), shipping::initialise(), payment::initialise(), AbstractAcaModule::initialise_type(), is_page_here(), payment::javascript_validation(), new_class(), AbstractAcaModule::obj_db_values(), order_total::order_total(), order_total::process_cart(), listingModule::return_db_min(), AbstractAcaModule::return_db_min(), order_total::shopping_cart_action(), tep_get_footer(), tep_get_header(), and tep_get_sidebar().

page::$PileFile = array() [static, private]

Array file exist cache.

Definition at line 52 of file page.php.

page::$PileFileLang = array() [private]

Array file lang (.txt).

Definition at line 47 of file page.php.

page::$propriete = array()

public Contient les propriete des element devant être remplacé dans les pages

Definition at line 35 of file page.php.

page::$title

Title intermediarire.

Definition at line 41 of file page.php.

Referenced by shipping::get_icon().


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