Stud.IP  4.2 Revision
File Class Reference
Inheritance diagram for File:
Inheritance graph
Collaboration diagram for File:
Collaboration graph

Public Member Functions

 getURL ()
 
 setURL ($url)
 
 getURL_access_type ()
 
 setURL_access_type ($value)
 
 getExtension ()
 
 getPath ()
 
 deleteDataFile ()
 
 connectWithDataFile ($path_to_file)
 
 cbSetAuthor ()
 
- Public Member Functions inherited from SimpleORMap
 __construct ($id=null)
 
 __clone ()
 
 getRelationOptions ($relation)
 
 getTableMetadata ()
 
 hasAutoIncrementColumn ()
 
 setId ($id)
 
 getId ()
 
 getNewId ()
 
 toArray ($only_these_fields=null)
 
 toRawArray ($only_these_fields=null)
 
 toArrayRecursive ($only_these_fields=null)
 
 getValue ($field)
 
 getRelationValue ($relation, $field)
 
 getDefaultValue ($field)
 
 setValue ($field, $value)
 
 __get ($field)
 
 __set ($field, $value)
 
 __isset ($field)
 
 offsetExists ($offset)
 
 offsetGet ($offset)
 
 offsetSet ($offset, $value)
 
 offsetUnset ($offset)
 
 getIterator ()
 
 count ()
 
 isField ($field)
 
 isAdditionalField ($field)
 
 isAliasField ($field)
 
 isI18nField ($field)
 
 setData ($data, $reset=false)
 
 isNew ()
 
 isDeleted ()
 
 setNew ($is_new)
 
 getWhereQuery ()
 
 restore ()
 
 store ()
 
 triggerChdate ()
 
 delete ()
 
 isDirty ()
 
 isFieldDirty ($field)
 
 revertValue ($field)
 
 getPristineValue ($field)
 
 initRelation ($relation)
 
 resetRelation ($relation)
 
 cleanup ()
 

Static Protected Member Functions

static configure ($config=array())
 
- Static Protected Member Functions inherited from SimpleORMap
static configure ($config=array())
 
static config ($key)
 

Additional Inherited Members

- Static Public Member Functions inherited from SimpleORMap
static tableScheme ($db_table)
 
static expireTableScheme ()
 
static find ($id)
 
static exists ($id)
 
static countBySql ($sql=1, $params=array())
 
static create ($data)
 
static build ($data, $is_new=true)
 
static buildExisting ($data)
 
static import ($data)
 
static findBySQL ($sql, $params=array())
 
static findOneBySQL ($where, $params=array())
 
static findThru ($foreign_key_value, $options)
 
static findEachBySQL ($callable, $sql, $params=array())
 
static findMany ($pks=array(), $order='', $order_params=array())
 
static findEachMany ($callable, $pks=array(), $order='', $order_params=array())
 
static findAndMapBySQL ($callable, $where, $params=array())
 
static findAndMapMany ($callable, $pks=array(), $order='', $order_params=array())
 
static deleteBySQL ($where, $params=array())
 
static toObject ($id_or_object)
 
static __callStatic ($name, $arguments)
 
- Static Public Attributes inherited from SimpleORMap
static $schemes = null
 
- Protected Member Functions inherited from SimpleORMap
 _getId ($field)
 
 _setId ($field, $value)
 
 _getAdditionalValueFromRelation ($field)
 
 _setAdditionalValueFromRelation ($field, $value)
 
 _getAdditionalValue ($field)
 
 _setAdditionalValue ($field, $value)
 
 parseRelationOptions ($type, $name, $options)
 
 storeRelations ($only_these=null)
 
 deleteRelations ()
 
 initializeContent ()
 
 applyCallbacks ($type)
 
 registerCallback ($types, $cb)
 
 unregisterCallback ($types, $cb)
 
 cbAutoIncrementColumn ($type)
 
 cbAutoKeyCreation ()
 
 cbNotificationMapper ($cb_type)
 
 cbAfterInitialize ($cb_type)
 
 setSerializedValue ($field, $value)
 
 setI18nValue ($field, $value)
 
 cbI18N ($type)
 
- Protected Attributes inherited from SimpleORMap
 $content = array()
 
 $content_db = array()
 
 $is_new = true
 
 $is_deleted = false
 
 $db_table = ''
 
 $db_fields = null
 
 $pk = null
 
 $default_values = array()
 
 $serialized_fields = array()
 
 $alias_fields = array()
 
 $i18n_fields = array()
 
 $additional_fields = array()
 
 $relations = array()
 
 $has_many = array()
 
 $has_one = array()
 
 $belongs_to = array()
 
 $has_and_belongs_to_many = array()
 
 $registered_callbacks = array()
 
 $known_slots = array()
 
 $notification_map = array()
 
 $additional_data = array()
 
 $getter_setter_map = array()
 
- Static Protected Attributes inherited from SimpleORMap
static $config = array()
 
static $reserved_slots = array('value','newid','iterator','tablemetadata', 'relationvalue','wherequery','relationoptions','data','new','id')
 

Member Function Documentation

◆ cbSetAuthor()

cbSetAuthor ( )

This callback is called before creating a File object. It assures that the author is set to a valid user by setting the user_id and author_name field. In case no user_id is set the ID of the current user is used. In case the author_name field is not set either the name of the user, referenced by user_id is set or the name of the current user is set.

Here is the call graph for this function:

◆ configure()

static configure (   $config = array())
staticprotected
Parameters
array$config

◆ connectWithDataFile()

connectWithDataFile (   $path_to_file)

Connects the File object to a physical file that is stored in the operating system's file system.

Parameters
string$path_to_fileThe path to the physical file.
Returns
bool Returns true on success and false on failure.
Here is the call graph for this function:

◆ deleteDataFile()

deleteDataFile ( )

Deletes the data file associated with the File object.

Returns
bool Returns true on success and false on failure.
Here is the call graph for this function:

◆ getExtension()

getExtension ( )

Returns the file extension of a file.

Returns
string A string with the file extension.

◆ getPath()

getPath ( )

Returns the path to the file in the operating system's file system.

Returns
null|string Returns the operating system's file system path of the file or null on failure.
Here is the caller graph for this function:

◆ getURL()

getURL ( )

Returns the URL, if the File object stores an URL.

Returns
string|null The URL if the File object stores an URL, null otherwise.

◆ getURL_access_type()

getURL_access_type ( )

Returns the URL access type, if the File object stores an URL.

Returns
string|null The URL access type, if the File object stores an URL, null otherwise.

◆ setURL()

setURL (   $url)

Sets the URL for the File object, if it stores an URL.

Parameters
string$urlThe URL which shall be stored in the File object.
Returns
string The URL from the $url parameter.

◆ setURL_access_type()

setURL_access_type (   $value)

Sets the URL access type for the File object, if it stores an URL.

Parameters
string$valueThe URL access type for the File object.
Returns
string The URL access type from the $value parameter.

The documentation for this class was generated from the following file: