Exponential Basic 2.4.0.1 Exponential Basic CMS — PHP Class Reference

ezproducttool.php
Go to the documentation of this file.
1 <?php
3 //
4 // $Id: ezproducttool.php 7909 2001-10-16 16:17:26Z ce $
5 //
6 // Definition of eZProductTool class
7 //
8 // Created on: <30-Apr-2001 18:36:08 amos>
9 //
10 // This source file is part of Exponential Basic, publishing software.
11 //
12 // Copyright (C) 1999-2001 eZ Systems. All rights reserved.
13 //
14 // This program is free software; you can redistribute it and/or
15 // modify it under the terms of the GNU General Public License
16 // as published by the Free Software Foundation; either version 2
17 // of the License, or (at your option) any later version.
18 //
19 // This program is distributed in the hope that it will be useful,
20 // but WITHOUT ANY WARRANTY; without even the implied warranty of
21 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 // GNU General Public License for more details.
23 //
24 // You should have received a copy of the GNU General Public License
25 // along with this program; if not, write to the Free Software
26 // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, US
27 //
28
31
35 // include_once( "eztrade/classes/ezproduct.php" );
36 // include_once( "classes/ezcachefile.php" );
37
38 class eZProductTool
39 {
44 function deleteCache( $product )
45 {
46 if ( is_numeric( $product ) )
47 $product = new eZProduct( $product );
48 $CategoryID =& $product->categoryDefinition( false );
49 $CategoryArray =& $product->categories( false );
50 $Hotdeal = $product->isHotDeal();
51 $ProductID = $product->id();
52
53 $files = eZCacheFile::files( "kernel/eztrade/cache/", array( array( "productview", "productprint" ),
54 $ProductID, $CategoryID ),
55 "cache", "," );
56 foreach( $files as $file )
57 {
58 $file->delete();
59 }
60 $files = eZCacheFile::files( "kernel/eztrade/cache/", array( "productlist",
61 array_merge( $CategoryID, $CategoryArray ) ),
62 "cache", "," );
63 foreach( $files as $file )
64 {
65 $file->delete();
66 }
67 if ( $Hotdeal )
68 {
69 $files = eZCacheFile::files( "kernel/eztrade/cache/", array( "hotdealslist", NULL ),
70 "cache", "," );
71 foreach( $files as $file )
72 {
73 $file->delete();
74 }
75 }
76
77 $files =& eZCacheFile::files( "kernel/ezarticle/cache/",
78 array( "articlefrontpage",
79 NULL,
80 NULL),
81 "cache", "," );
82 foreach( $files as $file )
83 {
84 $file->delete();
85 }
86
87 }
88 }
89
90 ?>
$CategoryID
$CategoryID
Definition: admin/articleedit.php:53
$files
$files
Definition: articlepreview.php:91
eZProductTool
Definition: ezproducttool.php:39
eZProductTool\deleteCache
deleteCache( $product)
Definition: ezproducttool.php:44
eZProduct
Definition: ezproduct.php:71
$file
$file
Definition: ezfilemanager/user/filedownload.php:35
$product
$product
Definition: homepage.php:202
Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.