Stud.IP  3.1 Revision 48552
 All Data Structures Namespaces Files Functions Variables Groups Pages
RootDirectory Class Reference
Inheritance diagram for RootDirectory:
Inheritance graph
Collaboration diagram for RootDirectory:
Collaboration graph

Public Member Functions

 __construct ($id=null)
 delete ()
 checkAccess ($user_id=null, $throw_exception=true)
- Public Member Functions inherited from StudipDirectory
 createFile ($name, $description= '')
 copy (File $source, $name, $description= '')
 getEntry ($name)
 getPermissions ()
 countFiles ($count_deep=false, $count_folders=true)
 isEmpty ()
 isRootDirectory ()
 link (File $file, $name, $description= '')
 ensureUniqueFilename ($name, File $file=null)
 listFiles ()
 listDirectories ()
 mkdir ($name, $description= '')
 isReadable ()
 isWritable ()
 open ($mode)
 search ($text)
 setPermissions ($permissions)
 unlink ($name)
 update ()
- Public Member Functions inherited from File
 getLinks ()
 getStoragePath ()
 getStorageObject ()
 setContentFromFile ($file)
- Public Member Functions inherited from SimpleORMap
 __clone ()
 getRelationOptions ($relation)
 getTableMetadata ()
 hasAutoIncrementColumn ()
 setId ($id)
 getId ()
 getNewId ()
 toArray ($only_these_fields=null)
 toArrayRecursive ($only_these_fields=null)
 getValue ($field)
 getRelationValue ($relation, $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)
 setData ($data, $reset=false)
 haveData ()
 isNew ()
 isDeleted ()
 setNew ($is_new)
 getWhereQuery ()
 restore ()
 store ()
 triggerChdate ()
 isDirty ()
 isFieldDirty ($field)
 revertValue ($field)
 getPristineValue ($field)
 initRelation ($relation)
 resetRelation ($relation)

Static Public Member Functions

static find ($context_id)
- Static Public Member Functions inherited from StudipDirectory
static getRootDirectory ($context_id)
- Static Public Member Functions inherited from File
static get ($id)
- Static Public Member Functions inherited from SimpleORMap
static expireTableScheme ()
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 findByObject (SimpleORMap $object)
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)

Additional Inherited Members

- 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)
 getTableScheme ()
 storeRelations ($only_these=null)
 deleteRelations ()
 initializeContent ()
 applyCallbacks ($type)
 registerCallback ($types, $cb)
 unregisterCallback ($types, $cb)
 cbAutoIncrementColumn ($type)
 cbAutoKeyCreation ()
 cbNotificationMapper ($cb_type)
 setSerializedValue ($field, $value)
- Static Protected Member Functions inherited from StudipDirectory
static configure ($config=array())
- Protected Attributes inherited from File
 $storage_object
- Static Protected Attributes inherited from File
static $object_cache = array()

Detailed Description

File.php

Class to represent (virtual) root directory. Root directories are not represented in the database.

Copyright (c) 2013 Elmar Ludwig

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

Constructor & Destructor Documentation

__construct (   $id = null)

Initialize a new root directory object for the given id.

Parameters
string$idcontext id
Returns
RootDirectory directory object

Reimplemented from SimpleORMap.

Member Function Documentation

checkAccess (   $user_id = null,
  $throw_exception = true 
)

Checks whether a user has access to the current root directory.

Parameters
mixed$user_idId of the user or null for current user (default)
bool$throw_exceptionThrow an AccessDeniedException instead of returning false
Returns
bool indicating whether the user may access this root directory
Exceptions
AccessDeniedExceptionif $throw_exception is true and the user may not access the root directory

Reimplemented from File.

delete ( )

Delete the contents of this directory (recursively). The root directory itself cannot (and need not) be deleted.

Reimplemented from StudipDirectory.

Here is the call graph for this function:

static find (   $context_id)
static

Wrapper "find" method in compliance with the other SimpleORMap methods. Since the root directory is abstract and does not have a corresponding db entry, find would always return null otherwise.

Parameters
String$context_id
Returns
RootDirectory

Reimplemented from SimpleORMap.

Here is the caller graph for this function:


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