[ Index ]
 

Code source de eZ Publish 3.9.0

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

title

Body

[fermer]

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

   1  <?php
   2  //
   3  // Definition of eZCollaborationSimpleMessage class
   4  //
   5  // Created on: <24-Jan-2003 15:38:57 amos>
   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 ezcollaborationsimplemessage.php
  30  */
  31  
  32  /*!
  33    \class eZCollaborationSimpleMessage ezcollaborationsimplemessage.php
  34    \brief The class eZCollaborationSimpleMessage does
  35  
  36  */
  37  
  38  include_once ( 'kernel/classes/ezpersistentobject.php' );
  39  
  40  class eZCollaborationSimpleMessage extends eZPersistentObject
  41  {
  42      /*!
  43       Constructor
  44      */
  45      function eZCollaborationSimpleMessage( $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                                           'message_type' => array( 'name' => 'MessageType',
  57                                                                    'datatype' => 'string',
  58                                                                    'default' => '',
  59                                                                    'required' => true ),
  60                                           'data_text1' => array( 'name' => 'DataText1',
  61                                                                  'datatype' => 'text',
  62                                                                  'default' => '',
  63                                                                  'required' => true ),
  64                                           'data_text2' => array( 'name' => 'DataText2',
  65                                                                  'datatype' => 'text',
  66                                                                  'default' => '',
  67                                                                  'required' => true ),
  68                                           'data_text3' => array( 'name' => 'DataText3',
  69                                                                  'datatype' => 'text',
  70                                                                  'default' => '',
  71                                                                  'required' => true ),
  72                                           'data_int1' => array( 'name' => 'DataInt1',
  73                                                                 'datatype' => 'integer',
  74                                                                 'default' => 0,
  75                                                                 'required' => true ),
  76                                           'data_int2' => array( 'name' => 'DataInt2',
  77                                                                 'datatype' => 'integer',
  78                                                                 'default' => 0,
  79                                                                 'required' => true ),
  80                                           'data_int3' => array( 'name' => 'DataInt3',
  81                                                                 'datatype' => 'integer',
  82                                                                 'default' => 0,
  83                                                                 'required' => true ),
  84                                           'data_float1' => array( 'name' => 'DataFloat1',
  85                                                                   'datatype' => 'float',
  86                                                                   'default' => 0,
  87                                                                   'required' => true ),
  88                                           'data_float2' => array( 'name' => 'DataFloat2',
  89                                                                   'datatype' => 'float',
  90                                                                   'default' => 0,
  91                                                                   'required' => true ),
  92                                           'data_float3' => array( 'name' => 'DataFloat3',
  93                                                                   'datatype' => 'float',
  94                                                                   'default' => 0,
  95                                                                   'required' => true ),
  96                                           'creator_id' => array( 'name' => 'CreatorID',
  97                                                                  'datatype' => 'integer',
  98                                                                  'default' => 0,
  99                                                                  'required' => true,
 100                                                                  'foreign_class' => 'eZUser',
 101                                                                  'foreign_attribute' => 'contentobject_id',
 102                                                                  'multiplicity' => '1..*' ),
 103                                           'created' => array( 'name' => 'Created',
 104                                                               'datatype' => 'integer',
 105                                                               'default' => 0,
 106                                                               'required' => true ),
 107                                           'modified' => array( 'name' => 'Modified',
 108                                                                'datatype' => 'integer',
 109                                                                'default' => 0,
 110                                                                'required' => true ) ),
 111                        'keys' => array( 'id' ),
 112                        'function_attributes' => array( 'participant' => 'participant' ),
 113                        'increment_key' => 'id',
 114                        'class_name' => 'eZCollaborationSimpleMessage',
 115                        'name' => 'ezcollab_simple_message' );
 116      }
 117  
 118      function &create( $type, $text = false, $creatorID = false )
 119      {
 120          $date_time = time();
 121          if ( $creatorID === false )
 122          {
 123              include_once ( 'kernel/classes/datatypes/ezuser/ezuser.php' );
 124              $user =& eZUser::currentUser();
 125              $creatorID =& $user->attribute( 'contentobject_id' );
 126          }
 127          $row = array( 'message_type' => $type,
 128                        'data_text1' => $text,
 129                        'creator_id' => $creatorID,
 130                        'created' => $date_time,
 131                        'modified' => $date_time );
 132          $object = new eZCollaborationSimpleMessage( $row );
 133          return $object;
 134      }
 135  
 136      function fetch( $id, $asObject = true )
 137      {
 138          return eZPersistentObject::fetchObject( eZCollaborationSimpleMessage::definition(),
 139                                                  null,
 140                                                  array( "id" => $id ),
 141                                                  $asObject );
 142      }
 143  
 144      function &participant()
 145      {
 146          // TODO: Get participant trough participant link from item
 147          $retValue = null;
 148          return $retValue;
 149      }
 150  
 151      /// \privatesection
 152      var $ID;
 153      var $ParticipantID;
 154      var $Created;
 155      var $Modified;
 156      var $DataText1;
 157      var $DataText2;
 158      var $DataText3;
 159      var $DataInt1;
 160      var $DataInt2;
 161      var $DataInt3;
 162      var $DataFloat1;
 163      var $DataFloat2;
 164      var $DataFloat3;
 165  }
 166  
 167  ?>


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