[ Index ]
 

Code source de eZ Publish 3.9.0

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

title

Body

[fermer]

/kernel/classes/ -> ezimportlookuptable.php (source)

   1  <?php
   2  //
   3  // Definition of eZImportLookupTable class
   4  //
   5  // Created on: <08-Mar-2004 16:09:21 kk>
   6  //
   7  // SOFTWARE NAME: eZ publish
   8  // SOFTWARE RELEASE: 3.9.0
   9  // BUILD VERSION: 17785
  10  // COPYRIGHT NOTICE: Copyright (C) 1999-2006 eZ systems AS
  11  // SOFTWARE LICENSE: GNU General Public License v2.0
  12  // NOTICE: >
  13  //   This program is free software; you can redistribute it and/or
  14  //   modify it under the terms of version 2.0  of the GNU General
  15  //   Public License as published by the Free Software Foundation.
  16  //
  17  //   This program is distributed in the hope that it will be useful,
  18  //   but WITHOUT ANY WARRANTY; without even the implied warranty of
  19  //   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  20  //   GNU General Public License for more details.
  21  //
  22  //   You should have received a copy of version 2.0 of the GNU General
  23  //   Public License along with this program; if not, write to the Free
  24  //   Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
  25  //   MA 02110-1301, USA.
  26  //
  27  //
  28  
  29  /*! \file ezimportlookuptable.php
  30  
  31    This class is for storing node and object id transformations which occur during import of objects.
  32  */
  33  
  34  class eZImportLookupTable
  35  {
  36      /*!
  37       Constructor
  38      */
  39      function eZImportLookupTable()
  40      {
  41      }
  42  
  43      /*!
  44       Add node transformation lookup
  45  
  46       \param old node id
  47       \param old node path
  48       \param new node id
  49       \param new node path
  50      */
  51      function addNodeLookup( $oldNodeID, $oldNodePath, $newNodeID, $newNodePath )
  52      {
  53          $this->NodeIDTable[(string)$oldNodeID] = $newNodeID;
  54          $this->NodePathTable[(string)$oldNodePath] = $newNodePath;
  55      }
  56  
  57      /*!
  58       Add object transformation lookup
  59  
  60       \param old object id
  61       \param new object id
  62      */
  63      function addObjectLookup( $oldObjectID, $newObjectID )
  64      {
  65          $this->ObjectIDTable[(string)$oldObjectID] = $newObjectID;
  66      }
  67  
  68      /*!
  69       Get new Node id from old node id
  70  
  71       \param old node id
  72  
  73       \return new node id
  74      */
  75      function newNodeID( $oldNodeID )
  76      {
  77          return $this->NodeIDTable[(string)$oldNodeID];
  78      }
  79  
  80      /*!
  81       Get new Node path from old node path
  82  
  83       \param old node path
  84  
  85       \return new node path
  86      */
  87      function newNodePath( $oldNodePath )
  88      {
  89          return $this->NodePathTable[(string)$oldNodePath];
  90      }
  91  
  92      /*!
  93       Get new Object id from old object id
  94  
  95       \param old object id
  96  
  97       \return new object id
  98      */
  99      function newObjectID( $oldObjectID )
 100      {
 101          return $this->ObjectIDTable[(string)$oldObjectID];
 102      }
 103  
 104      /*!
 105       \static
 106  
 107       Fetch instance of eZImportLookupTable
 108  
 109       \param force new instance (optional), default false
 110      */
 111      function &instance( $forceNewInstance = false )
 112      {
 113          if ( $forceNewInstance === true )
 114          {
 115              $GLOBALS['eZImportLookupTable'] = new eZImportLookupTable();
 116          }
 117  
 118          $object =& $GLOBALS['eZImportLookupTable'];
 119          if ( !$object )
 120          {
 121              $GLOBALS['eZImportLookupTable'] = new eZImportLookupTable();
 122              $object =& $GLOBALS['eZImportLookupTable'];
 123          }
 124  
 125          return $object;
 126      }
 127  
 128      var $NodeIDTable = array();
 129      var $NodePathTable = array();
 130      var $ObjectIDTable = array();
 131      var $ObjectPathTable = array();
 132  }
 133  ?>


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