eZ Publish  [4.0]
ezshopaccounthandler.php
Go to the documentation of this file.
00001 <?php
00002 //
00003 // Definition of eZShopAccountHandler class
00004 //
00005 // Created on: <12-Feb-2003 16:50:52 bf>
00006 //
00007 // ## BEGIN COPYRIGHT, LICENSE AND WARRANTY NOTICE ##
00008 // SOFTWARE NAME: eZ Publish
00009 // SOFTWARE RELEASE: 4.0.x
00010 // COPYRIGHT NOTICE: Copyright (C) 1999-2008 eZ Systems AS
00011 // SOFTWARE LICENSE: GNU General Public License v2.0
00012 // NOTICE: >
00013 //   This program is free software; you can redistribute it and/or
00014 //   modify it under the terms of version 2.0  of the GNU General
00015 //   Public License as published by the Free Software Foundation.
00016 //
00017 //   This program is distributed in the hope that it will be useful,
00018 //   but WITHOUT ANY WARRANTY; without even the implied warranty of
00019 //   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00020 //   GNU General Public License for more details.
00021 //
00022 //   You should have received a copy of version 2.0 of the GNU General
00023 //   Public License along with this program; if not, write to the Free
00024 //   Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
00025 //   MA 02110-1301, USA.
00026 //
00027 //
00028 // ## END COPYRIGHT, LICENSE AND WARRANTY NOTICE ##
00029 //
00030 
00031 class eZShopAccountHandler
00032 {
00033     function eZShopAccountHandler()
00034     {
00035 
00036     }
00037 
00038     /*!
00039      returns the current shop account instance
00040     */
00041     static function instance()
00042     {
00043         $accountHandler = null;
00044         if ( eZExtension::findExtensionType( array( 'ini-name' => 'shopaccount.ini',
00045                                                     'repository-group' => 'HandlerSettings',
00046                                                     'repository-variable' => 'Repositories',
00047                                                     'extension-group' => 'HandlerSettings',
00048                                                     'extension-variable' => 'ExtensionRepositories',
00049                                                     'type-group' => 'AccountSettings',
00050                                                     'type-variable' => 'Handler',
00051                                                     'alias-group' => 'AccountSettings',
00052                                                     'alias-variable' => 'Alias',
00053                                                     'subdir' => 'shopaccounthandlers',
00054                                                     'type-directory' => false,
00055                                                     'extension-subdir' => 'shopaccounthandlers',
00056                                                     'suffix-name' => 'shopaccounthandler.php' ),
00057                                              $out ) )
00058         {
00059             $filePath = $out['found-file-path'];
00060             include_once( $filePath );
00061             $class = $out['type'] . 'ShopAccountHandler';
00062             $accountHandler = new $class( );
00063         }
00064         else
00065         {
00066             //include_once( 'kernel/classes/shopaccounthandlers/ezdefaultshopaccounthandler.php' );
00067             $accountHandler = new eZDefaultShopAccountHandler();
00068         }
00069         return $accountHandler;
00070     }
00071 }
00072 
00073 ?>