Krizalys Onedrive DriveItem - krizalys/onedrive-php-sdk GitHub Wiki

Krizalys\Onedrive\DriveItem

A proxy to an item stored on a OneDrive drive.

DriveItem is an abstract class for either:

A DriveItem instance is only an interface to an actual OneDrive item. The underlying item is affected only when using exposed methods, such as move().

This class also exposes accessors, such as getParentId(), which retrieve the actual value from the underlying OneDrive item. For better performance, these values are cached on the DriveItem instance after first call.

  • Class name: DriveItem
  • Namespace: Krizalys\Onedrive
  • This is an abstract class
  • Warning: this class is deprecated. This means that this class will likely be removed in a future version.

Properties

$_client

protected \Krizalys\Onedrive\Client $_client
  • Visibility: protected
  • Warning: this property is deprecated. This means that this property will likely be removed in a future version.

$_id

protected string $_id
  • Visibility: protected
  • Warning: this property is deprecated. This means that this property will likely be removed in a future version.

$_parentId

private string $_parentId
  • Visibility: private
  • Warning: this property is deprecated. This means that this property will likely be removed in a future version.

$_name

private string $_name
  • Visibility: private
  • Warning: this property is deprecated. This means that this property will likely be removed in a future version.

$_description

private string $_description
  • Visibility: private
  • Warning: this property is deprecated. This means that this property will likely be removed in a future version.

$_size

private integer $_size
  • Visibility: private
  • Warning: this property is deprecated. This means that this property will likely be removed in a future version.

$_source

private string $_source
  • Visibility: private
  • Warning: this property is deprecated. This means that this property will likely be removed in a future version.

$_createdTime

private integer $_createdTime
  • Visibility: private
  • Warning: this property is deprecated. This means that this property will likely be removed in a future version.

$_updatedTime

private integer $_updatedTime
  • Visibility: private
  • Warning: this property is deprecated. This means that this property will likely be removed in a future version.

Methods

__construct

mixed Krizalys\Onedrive\DriveItem::__construct(\Krizalys\Onedrive\Client $client, null|string $id, array<mixed,mixed>|object $options)

Constructor.

  • Visibility: public
  • Warning: this method is deprecated. This means that this method will likely be removed in a future version.

Arguments

  • $client Krizalys\Onedrive\Client - The Client instance owning this DriveItem instance.

  • $id null|string - The unique ID of the OneDrive drive item referenced by this DriveItem instance.

  • $options array<mixed,mixed>|object

    The options. Supported options:

    • 'parent_id' (string): the unique ID of the parent OneDrive folder of this drive item ;
    • 'name' (string): the name of this drive item ;
    • 'description' (string): the description of this drive item. May be empty ;
    • 'size' (int): the size of this drive item, in bytes ;
    • 'source' (string): the source link of this drive item ;
    • 'created_time' (string): the creation time, as an RFC date/time ;
    • 'updated_time' (string): the last modification time, as an RFC date/time.

isFolder

boolean Krizalys\Onedrive\DriveItem::isFolder()

Determines whether the OneDrive drive item referenced by this DriveItem instance is a folder.

  • Visibility: public
  • Warning: this method is deprecated. This means that this method will likely be removed in a future version.

fetchProperties

array<mixed,mixed> Krizalys\Onedrive\DriveItem::fetchProperties()

Fetches the properties of the OneDrive drive item referenced by this DriveItem instance.

Some properties are cached for faster subsequent access.

  • Visibility: public
  • Warning: this method is deprecated. This means that this method will likely be removed in a future version.

getId

string Krizalys\Onedrive\DriveItem::getId()

Gets the unique ID of the OneDrive drive item referenced by this DriveItem instance.

  • Visibility: public
  • Warning: this method is deprecated. This means that this method will likely be removed in a future version.

getParentId

string Krizalys\Onedrive\DriveItem::getParentId()

Gets the unique ID of the parent folder of the OneDrive drive item referenced by this DriveItem instance.

  • Visibility: public
  • Warning: this method is deprecated. This means that this method will likely be removed in a future version.

getName

string Krizalys\Onedrive\DriveItem::getName()

Gets the name of the OneDrive drive item referenced by this DriveItem instance.

  • Visibility: public
  • Warning: this method is deprecated. This means that this method will likely be removed in a future version.

getDescription

string Krizalys\Onedrive\DriveItem::getDescription()

Gets the description of the OneDrive drive item referenced by this DriveItem instance.

  • Visibility: public
  • Warning: this method is deprecated. This means that this method will likely be removed in a future version.

getSize

integer Krizalys\Onedrive\DriveItem::getSize()

Gets the size of the OneDrive drive item referenced by this DriveItem instance.

  • Visibility: public
  • Warning: this method is deprecated. This means that this method will likely be removed in a future version.

getSource

string Krizalys\Onedrive\DriveItem::getSource()

Gets the source link of the OneDrive drive item referenced by this DriveItem instance.

  • Visibility: public
  • Warning: this method is deprecated. This means that this method will likely be removed in a future version.

getCreatedTime

integer Krizalys\Onedrive\DriveItem::getCreatedTime()

Gets the creation time of the OneDrive drive item referenced by this DriveItem instance.

  • Visibility: public
  • Warning: this method is deprecated. This means that this method will likely be removed in a future version.

getUpdatedTime

integer Krizalys\Onedrive\DriveItem::getUpdatedTime()

Gets the last modification time of the OneDrive drive item referenced by this DriveItem instance.

  • Visibility: public
  • Warning: this method is deprecated. This means that this method will likely be removed in a future version.

move

mixed Krizalys\Onedrive\DriveItem::move(null|string $destinationId)

Moves the OneDrive drive item referenced by this DriveItem instance into another OneDrive folder.

$destinationId must refer to a folder.

  • Visibility: public
  • Warning: this method is deprecated. This means that this method will likely be removed in a future version.

Arguments

  • $destinationId null|string - The unique ID of the OneDrive folder into which to move the OneDrive drive item referenced by this DriveItem instance, or null to move it to the OneDrive root folder. Default: null.