[ Index ] |
|
Code source de eZ Publish 3.9.0 |
1 <?php 2 // 3 // Definition of eZDiscountRule class 4 // 5 // Created on: <27-Nov-2002 13:05:59 wy> 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 ezdiscountrule.php 30 */ 31 32 /*! 33 \class eZDiscountRule ezdiscountrule.php 34 \brief The class eZDiscountRule does 35 36 */ 37 38 include_once ( "kernel/classes/ezpersistentobject.php" ); 39 40 class eZDiscountRule extends eZPersistentObject 41 { 42 /*! 43 Constructor 44 */ 45 function eZDiscountRule( $row ) 46 { 47 $this->eZPersistentObject( $row ); 48 } 49 50 function definition() 51 { 52 return array( "fields" => array( "id" => array( 'name' => 'ID', 53 'datatype' => 'integer', 54 'default' => 0, 55 'required' => true ), 56 "name" => array( 'name' => "Name", 57 'datatype' => 'string', 58 'default' => '', 59 'required' => true ) ), 60 "keys" => array( "id" ), 61 "increment_key" => "id", 62 "class_name" => "eZDiscountRule", 63 "name" => "ezdiscountrule" ); 64 } 65 66 function fetch( $id, $asObject = true ) 67 { 68 return eZPersistentObject::fetchObject( eZDiscountRule::definition(), 69 null, 70 array( "id" => $id ), 71 $asObject ); 72 } 73 74 function fetchList( $asObject = true ) 75 { 76 return eZPersistentObject::fetchObjectList( eZDiscountRule::definition(), 77 null, null, null, null, 78 $asObject ); 79 } 80 81 function create() 82 { 83 $row = array( 84 "id" => null, 85 "name" => ezi18n( "kernel/shop/discountgroup", "New discount group" ) ); 86 return new eZDiscountRule( $row ); 87 } 88 89 /*! 90 \note Transaction unsafe. If you call several transaction unsafe methods you must enclose 91 the calls within a db transaction; thus within db->begin and db->commit. 92 */ 93 function remove( $id ) 94 { 95 eZPersistentObject::removeObject( eZDiscountRule::definition(), 96 array( "id" => $id ) ); 97 } 98 } 99 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Sat Feb 24 10:30:04 2007 | par Balluche grâce à PHPXref 0.7 |