Exponential Basic 2.4.0.1 Exponential Basic CMS — PHP Class Reference

Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
eZVirtualFile Class Reference

## Public Member Functions
| __construct ( $id="")
| store ()
| delete ()
| get ( $id="")
& | getAll ()
& | search (&$queryText, $offset=0, $limit=30, $userID=-1)
| searchCount (&$queryText, $userID=-1)
| id ()
& | name ( $html=true)
& | description ( $html=true)
& | fileName ()
& | originalFileName ()
& | user ( $as_object=true)
| isOwner ( $user, $file)
& | filePath ( $relative=false)
& | fileSize ()
& | siFileSize ()
| setName ( $value)
| setDescription ( $value)
| setOriginalFileName ( $value)
| setUser ( $user)
| setFile (&$file)
& | folder ( $as_object=true)
| removeFolders ()
| addPageView ( $pageView)
| fileExists ( $dir, $file)

## Static Public Member Functions
static & | getUnassigned ()

## Public Attributes
| $ID
| $Name
| $Caption
| $Description
| $FileName
| $OriginalFileName
| $UserID

## Detailed Description

! eZFileManager The eZVirtualFile represents a file in the virtual file manager.

TODO

Definition at line 41 of file ezvirtualfile.php.

## Constructor & Destructor Documentation

## ◆ __construct()

eZVirtualFile::__construct | ( |  | $id = `""` | ) |

Constructs a new eZVirtualfile object.

Definition at line 46 of file ezvirtualfile.php.

References $id, and $ID.

## Member Function Documentation

## ◆ addPageView()

eZVirtualFile::addPageView | ( |  | $pageView | ) |

Adds a pagview to the file.

Definition at line 547 of file ezvirtualfile.php.

References $db, $pageView, $query, $result, and eZDB\globalDatabase().

## ◆ delete()

eZVirtualFile::delete | ( |  | ) |

Delete the eZVirtualFile object from the database and the filesystem.

Definition at line 107 of file ezvirtualfile.php.

References $db, $result, $results, file_exists(), filePath(), eZDB\globalDatabase(), and eZPBFile\unlink().

## ◆ description()

& eZVirtualFile::description | ( |  | $html = `true` | ) |

Returns the description of the virtual file.

Definition at line 331 of file ezvirtualfile.php.

References $Description.

## ◆ fileExists()

eZVirtualFile::fileExists | ( |  | $dir,
|  |  | $file
| ) |  |

Checks if a file exists in a virtual directory

Definition at line 574 of file ezvirtualfile.php.

References $dir, $file, $ret, and eZVirtualFolder\getByName().

Referenced by addFile().

## ◆ fileName()

& eZVirtualFile::fileName | ( |  | ) |

Returns the filename of the virtual file.

Definition at line 343 of file ezvirtualfile.php.

References $FileName.

## ◆ filePath()

& eZVirtualFile::filePath | ( |  | $relative = `false` | ) |

Returns the path and filename to the original virtualfile.

If $relative is set to true the path is returned relative. Absolute is default.

Definition at line 397 of file ezvirtualfile.php.

References $FileName.

Referenced by delete(), fileSize(), and setFile().

## ◆ fileSize()

& eZVirtualFile::fileSize | ( |  | ) |

Returns the size of the file.

Definition at line 415 of file ezvirtualfile.php.

References $size, filePath(), and eZPBFile\filesize().

Referenced by siFileSize().

## ◆ folder()

& eZVirtualFile::folder | ( |  | $as_object = `true` | ) |

Retuns the folder for this eZVirtualFile object.

Definition at line 518 of file ezvirtualfile.php.

References $db, $folder, $query, $result, and eZDB\globalDatabase().

## ◆ get()

eZVirtualFile::get | ( |  | $id = `""` | ) |

Fetches the object information from the database.

Definition at line 142 of file ezvirtualfile.php.

References $db, $id, $ret, eZDB\globalDatabase(), and Name.

## ◆ getAll()

& eZVirtualFile::getAll | ( |  | ) |

Returns all the files found in the database.

The files are returned as an array of eZVirtualFile objects.

Definition at line 175 of file ezvirtualfile.php.

References $category_array, $db, $i, and eZDB\globalDatabase().

## ◆ getUnassigned()

static& eZVirtualFile::getUnassigned | ( |  | ) |
| static

Get all the files that is not assigned to a category.

The images are returned as an array of eZVirtualFile objects.

Definition at line 290 of file ezvirtualfile.php.

References $db, $file, and eZDB\globalDatabase().

## ◆ id()

eZVirtualFile::id | ( |  | ) |

Returns the id of the virtual file.

Definition at line 311 of file ezvirtualfile.php.

References $ID.

## ◆ isOwner()

eZVirtualFile::isOwner | ( |  | $user,
|  |  | $file
| ) |  |

\Static Returns true if the given user is the owner of the given object. $user is either a userID or an eZUser. $file is the ID of the file.

Definition at line 376 of file ezvirtualfile.php.

References $db, $res, $user, $userID, and eZDB\globalDatabase().

## ◆ name()

& eZVirtualFile::name | ( |  | $html = `true` | ) |

Returns the name of the virtual file.

Definition at line 319 of file ezvirtualfile.php.

References $Name, and Name.

## ◆ originalFileName()

& eZVirtualFile::originalFileName | ( |  | ) |

Returns the original file name of the virtual file.

Definition at line 351 of file ezvirtualfile.php.

References $OriginalFileName.

## ◆ removeFolders()

eZVirtualFile::removeFolders | ( |  | ) |

Removes the file from every folders.

Definition at line 536 of file ezvirtualfile.php.

References $db, $query, and eZDB\globalDatabase().

## ◆ search()

& eZVirtualFile::search | ( | & | $queryText,
|  |  | $offset = `0`,
|  |  | $limit = `30`,
|  |  | $userID = `-1`
| ) |  |

Does a search in the filemanager.

Default limit is set to 30.

Definition at line 197 of file ezvirtualfile.php.

References $db, $file, $group, $limit, $offset, $query, $ret, $user, $userID, eZUser\currentUser(), and eZDB\globalDatabase().

## ◆ searchCount()

eZVirtualFile::searchCount | ( | & | $queryText,
|  |  | $userID = `-1`
| ) |  |

Returns the total count of a query.

Definition at line 244 of file ezvirtualfile.php.

References $db, $group, $query, $ret, $user, $userID, eZUser\currentUser(), and eZDB\globalDatabase().

## ◆ setDescription()

eZVirtualFile::setDescription | ( |  | $value | ) |

Sets the virtual file description.

Definition at line 449 of file ezvirtualfile.php.

## ◆ setFile()

eZVirtualFile::setFile | ( | & | $file | ) |

Makes a copy of the file and stores the file in the file manager.

Definition at line 481 of file ezvirtualfile.php.

References $file, $name, $suffix, file_exists(), filePath(), and eZPBFile\unlink().

## ◆ setName()

eZVirtualFile::setName | ( |  | $value | ) |

Sets the virtual file name.

Definition at line 441 of file ezvirtualfile.php.

References Name.

## ◆ setOriginalFileName()

eZVirtualFile::setOriginalFileName | ( |  | $value | ) |

Sets the original virtual filename.

Definition at line 457 of file ezvirtualfile.php.

## ◆ setUser()

eZVirtualFile::setUser | ( |  | $user | ) |

Sets the user of the file.

Definition at line 465 of file ezvirtualfile.php.

References $user.

## ◆ siFileSize()

& eZVirtualFile::siFileSize | ( |  | ) |

Returns the size of the file in a shortened form useful for printing to the user, the returned value is an array with the filesize, the size as a shortened string and the unit. The keys used for fetching the various items in the array are: "size" - The full file size "size-string" - The shortened file size as a string "unit" - The unit for the shortened size, either B, KB, MB or GB

Definition at line 432 of file ezvirtualfile.php.

References $size, fileSize(), and eZPBFile\siFileSize().

## ◆ store()

eZVirtualFile::store | ( |  | ) |

Stores a eZVirtualFile object to the database.

Definition at line 60 of file ezvirtualfile.php.

References $db, $name, $result, eZDB\globalDatabase(), and Name.

## ◆ user()

& eZVirtualFile::user | ( |  | $as_object = `true` | ) |

Returns a eZUser object.

Definition at line 360 of file ezvirtualfile.php.

References $ret, and $UserID.

## Member Data Documentation

## ◆ $Caption

eZVirtualFile::$Caption

Definition at line 588 of file ezvirtualfile.php.

## ◆ $Description

eZVirtualFile::$Description

Definition at line 589 of file ezvirtualfile.php.

Referenced by description().

## ◆ $FileName

eZVirtualFile::$FileName

Definition at line 590 of file ezvirtualfile.php.

Referenced by fileName(), and filePath().

## ◆ $ID

eZVirtualFile::$ID

Definition at line 586 of file ezvirtualfile.php.

Referenced by __construct(), and id().

## ◆ $Name

eZVirtualFile::$Name

Definition at line 587 of file ezvirtualfile.php.

Referenced by name().

## ◆ $OriginalFileName

eZVirtualFile::$OriginalFileName

Definition at line 591 of file ezvirtualfile.php.

Referenced by originalFileName().

## ◆ $UserID

eZVirtualFile::$UserID

Definition at line 592 of file ezvirtualfile.php.

Referenced by user().

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

- ezvirtualfile.php

Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.