[ Index ]
 

Code source de eZ Publish 3.9.0

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/kernel/common/ -> template.php (source)

   1  <?php
   2  //
   3  // Created on: <16-Apr-2002 12:37:51 amos>
   4  //
   5  // SOFTWARE NAME: eZ publish
   6  // SOFTWARE RELEASE: 3.9.0
   7  // BUILD VERSION: 17785
   8  // COPYRIGHT NOTICE: Copyright (C) 1999-2006 eZ systems AS
   9  // SOFTWARE LICENSE: GNU General Public License v2.0
  10  // NOTICE: >
  11  //   This program is free software; you can redistribute it and/or
  12  //   modify it under the terms of version 2.0  of the GNU General
  13  //   Public License as published by the Free Software Foundation.
  14  //
  15  //   This program is distributed in the hope that it will be useful,
  16  //   but WITHOUT ANY WARRANTY; without even the implied warranty of
  17  //   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  18  //   GNU General Public License for more details.
  19  //
  20  //   You should have received a copy of version 2.0 of the GNU General
  21  //   Public License along with this program; if not, write to the Free
  22  //   Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
  23  //   MA 02110-1301, USA.
  24  //
  25  //
  26  
  27  
  28  function &templateInit( $name = false )
  29  {
  30      if ( $name === false )
  31          $tpl =& $GLOBALS["eZPublishTemplate"];
  32      else
  33          $tpl =& $GLOBALS["eZPublishTemplate_$name"];
  34      if ( get_class( $tpl ) == "eztemplate" )
  35          return $tpl;
  36      include_once ( "lib/eztemplate/classes/eztemplate.php" );
  37      include_once ( 'kernel/common/eztemplatedesignresource.php' );
  38      include_once ( 'lib/ezutils/classes/ezextension.php' );
  39  
  40      $tpl = eZTemplate::instance();
  41  
  42      include_once ( 'lib/ezutils/classes/ezini.php' );
  43      $ini =& eZINI::instance();
  44      if ( $ini->variable( 'TemplateSettings', 'Debug' ) == 'enabled' )
  45          eZTemplate::setIsDebugEnabled( true );
  46  
  47      $compatAutoLoadPath = $ini->variableArray( 'TemplateSettings', 'AutoloadPath' );
  48      $autoLoadPathList = $ini->variable( 'TemplateSettings', 'AutoloadPathList' );
  49  
  50      $extensionAutoloadPath = $ini->variable( 'TemplateSettings', 'ExtensionAutoloadPath' );
  51      $extensionPathList = eZExtension::expandedPathList( $extensionAutoloadPath, 'autoloads' );
  52  
  53      $autoLoadPathList = array_unique( array_merge( $compatAutoLoadPath, $autoLoadPathList, $extensionPathList ) );
  54  
  55      $a =& $autoLoadPathList;
  56      $tpl->setAutoloadPathList( $a );
  57      $tpl->autoload();
  58  
  59      $tpl->registerResource( eZTemplateDesignResource::instance() );
  60      $tpl->registerResource( eZTemplateDesignResource::standardInstance() );
  61  
  62      return $tpl;
  63  }
  64  
  65  
  66  ?>


Généré le : Sat Feb 24 10:30:04 2007 par Balluche grâce à PHPXref 0.7