Overview

Packages

  • ClipIt
    • clipit
      • api
    • urjc
      • backend
  • Elgg
    • Core
      • Access
      • Authentication
      • Cache
      • Caches
      • Core
      • DataMode
        • Site
      • DataModel
        • Annotations
        • Entities
        • Extender
        • File
        • Importable
        • Loggable
        • Notable
        • Object
        • User
      • DataStorage
      • Exception
      • Exceptions
        • Stub
      • FileStore
        • Disk
      • Groups
      • Helpers
      • HMAC
      • Memcache
      • Metadata
      • Navigation
      • ODD
      • Output
      • Plugins
        • Settings
      • Sessions
      • SocialModel
        • Friendable
        • Locatable
      • WebServicesAPI
      • Widgets
      • XML
      • XMLRPC
    • Exceptions
      • Stub
  • None
  • PHP

Classes

  • UBCollection
  • UBEvent
  • UBFile
  • UBItem
  • UBMessage
  • UBSite
  • UBUser
  • Overview
  • Package
  • Class
  • Tree

Class UBFile

<Class Description>

UBItem
Extended by UBFile

Direct known subclasses

ClipitFile
Package: ClipIt\urjc\backend
License: Affero General Public License v3
Author: Pablo LlinĂ¡s Arnaiz <pebs74@gmail.com>, URJC JuxtaLearn Team
Located at UBFile.php
Methods summary
public
# __construct( integer $id = null )

Constructor

Constructor

Parameters

$id
integer
$id If != null, load instance.

Throws

APIException

Overrides

UBItem::__construct()
protected
# copy_from_elgg( ElggFile $elgg_file )

Loads object parameters stored in Elgg

Loads object parameters stored in Elgg

Parameters

$elgg_file
ElggFile
$elgg_file

Overrides

UBItem::copy_from_elgg()
protected
# copy_to_elgg( ElggFile $elgg_file )

Copy $this file parameters into an Elgg File entity.

Copy $this file parameters into an Elgg File entity.

Parameters

$elgg_file
ElggFile
$elgg_file Elgg object instance to save $this to

Overrides

UBItem::copy_to_elgg()
protected boolean|integer
# save( boolean $double_save = false )

Saves this instance into the system.

Saves this instance into the system.

Parameters

$double_save
boolean
$double_save defaults to false. This param has no effect in the current implementation and is just added for compatibility reasons to UBFile's ancestors.

Returns

boolean|integer
Returns id of saved instance, or false if error.

Overrides

UBItem::save()
public static boolean|integer
# create_clone( integer $id, boolean $linked = true, boolean $keep_owner = false )

Clone the specified File, including all of its properties.

Clone the specified File, including all of its properties.

Parameters

$id
integer
$id File id from which to create a clone.
$linked
boolean
$linked Selects whether the clone will be linked to the parent object.
$keep_owner
boolean
$keep_owner Selects whether the clone will keep the parent file's owner (default: no)

Returns

boolean|integer
Id of the new clone Item, false in case of error.

Overrides

UBItem::create_clone()
public static boolean|mixed|null|string
# get_mime_type( string $file )

Get File MIME Type

Get File MIME Type

Parameters

$file
string
$file Filename on Filestore

Returns

boolean|mixed|null|string
Mime Type
public static string
# get_simple_mime_type( string $mime_type )

Returns an overall file type from the mimetype

Returns an overall file type from the mimetype

Parameters

$mime_type
string
$mime_type The MIME type

Returns

string
The overall type
Methods inherited from UBItem
count_all(), create(), delete_all(), delete_by_id(), get_all(), get_all_parents(), get_by_id(), get_by_owner(), get_clone_tree(), get_cloned_from(), get_clones(), get_events(), get_from_search(), get_properties(), link_parent_clone(), list_properties(), set_properties(), sort_by_date(), sort_by_date_inv(), sort_by_name(), sort_by_name_inv(), sort_numbers(), sort_numbers_inv(), unlink_from_clones(), unlink_from_parent()
Constants summary
string TIMESTAMP_DELIMITER "#"
#

Class constants

Class constants

string DEFAULT_FILENAME "unnamed_file"
#
integer THUMB_SMALL 64
#
integer THUMB_MEDIUM 128
#
integer THUMB_LARGE 256
#
Constants inherited from UBItem
REL_PARENT_CLONE, SUBTYPE, TYPE
Properties summary
public mixed $data null
#

Class variables

Class variables

public integer $size 0
#
public string $file_path ""
#
public string $temp_path ""
#
public array $thumb_small array()
#
public array $thumb_medium array()
#
public array $thumb_large array()
#
public array $mime_type array()
#
Properties inherited from UBItem
$clone_array, $cloned_from, $description, $id, $name, $owner_id, $time_created, $url
API documentation generated by ApiGen 2.8.0