Properties

$sqlSupported

$sqlSupported : 

Type

$legacyPublicFolder

$legacyPublicFolder : 

Type

$modifiableShareKeys

$modifiableShareKeys : 

Type

$shareMetaManager

$shareMetaManager : 

Type

$hashMinLength

$hashMinLength : integer

Type

integer

Methods

__construct()

__construct(\Pydio\Core\Model\ContextInterface  $context, string  $downloadFolder, integer  $hashMinLength = 32) 

ShareStore constructor.

Parameters

\Pydio\Core\Model\ContextInterface $context
string $downloadFolder
integer $hashMinLength

getHashMinLength()

getHashMinLength() : integer

Returns

integer

storeShare()

storeShare(String  $parentRepositoryId, array  $shareData, string  $type = "minisite", String  $existingHash = null, null  $updateHash = null) : string

Parameters

String $parentRepositoryId
array $shareData
string $type
String $existingHash
null $updateHash

Throws

\Exception

Returns

string —

$hash

createEmptyShareObject()

createEmptyShareObject() : \Pydio\Share\Model\ShareLink

Initialize an empty ShareLink object.

Returns

\Pydio\Share\Model\ShareLink

loadShareObject()

loadShareObject(string  $hash) : \Pydio\Share\Model\ShareLink

Initialize a ShareLink from persisted data.

Parameters

string $hash

Throws

\Exception

Returns

\Pydio\Share\Model\ShareLink

loadShare()

loadShare(  $hash) : array|boolean|mixed

Load data persisted on DB or on publiclet files.

Parameters

$hash

Returns

array|boolean|mixed

shareIsLegacy()

shareIsLegacy(string  $hash) : boolean

Test if hash.php is a real file.

Parameters

string $hash

Returns

boolean

updateShareProperty()

updateShareProperty(string  $hash, string  $pName, string  $pValue) : boolean

Update a single share property

Parameters

string $hash
string $pName
string $pValue

Throws

\Exception

Returns

boolean

findSharesForRepo()

findSharesForRepo(  $repositoryId) : array

List shares based on child repository ID;

Parameters

$repositoryId

Returns

array

listShares()

listShares(string  $limitToUser = '', string  $parentRepository = '', null  $cursor = null, null  $shareType = null) : array

List all shares persisted in DB and on file.

Parameters

string $limitToUser
string $parentRepository
null $cursor
null $shareType

Returns

array

testUserCanEditShare()

testUserCanEditShare(string  $userId, array|null  $shareData) : boolean

Parameters

string $userId

Share OWNER user ID / Will be compared to the currently logged user ID

array|null $shareData

Share Data

Throws

\Exception

Returns

boolean —

Wether currently logged user can view/edit this share or not.

deleteShare()

deleteShare(String  $type, String  $element, boolean  $keepRepository = false, boolean  $ignoreRepoNotFound = false, \Pydio\Access\Core\Model\AJXP_Node  $ajxpNode = null) : boolean

Parameters

String $type
String $element
boolean $keepRepository
boolean $ignoreRepoNotFound
\Pydio\Access\Core\Model\AJXP_Node $ajxpNode

Throws

\Exception

Returns

boolean

moveSharesFromMetaRecursive()

moveSharesFromMetaRecursive(\Pydio\Access\Core\Model\AJXP_Node  $baseNode, boolean  $delete = false, string  $oldPath, string  $newPath, string|null  $parentRepositoryPath = null) : integer

Parameters

\Pydio\Access\Core\Model\AJXP_Node $baseNode
boolean $delete
string $oldPath
string $newPath
string|null $parentRepositoryPath

Returns

integer —

Number of nodes modified in different repositories

moveSharesFromMeta()

moveSharesFromMeta(array  $shares, String  $operation = "move", \Pydio\Access\Core\Model\AJXP_Node  $oldNode, \Pydio\Access\Core\Model\AJXP_Node  $newNode = null, array  $collectRepositories = array(), string|null  $parentRepositoryPath = null) : array

Parameters

array $shares
String $operation
\Pydio\Access\Core\Model\AJXP_Node $oldNode
\Pydio\Access\Core\Model\AJXP_Node $newNode
array $collectRepositories
string|null $parentRepositoryPath

Throws

\Exception

Returns

array

shareExists()

shareExists(String  $type, String  $element) : boolean

Parameters

String $type
String $element

Returns

boolean

resetDownloadCounter()

resetDownloadCounter(string  $hash, string  $userId) 

Set the counter value to 0.

Parameters

string $hash
string $userId

Throws

\Exception

clearExpiredFiles()

clearExpiredFiles(boolean|true  $currentUser = true) : array

Find all expired shares and remove them.

Parameters

boolean|true $currentUser

Returns

array

updateShareType()

updateShareType(  $shareData) 

Update share type from legacy values to new ones.

Parameters

$shareData

deleteExpiredPubliclet()

deleteExpiredPubliclet(  $elementId,   $data) 

Delete an expired publiclets.

Parameters

$elementId
$data

Throws

\Exception

computeHash()

computeHash(String  $outputData, String|null  $checkInFolder = null) : string

Computes a short form of the hash, checking if it already exists in the folder, in which case it increases the hashlength until there is no collision.

Parameters

String $outputData

Serialized data

String|null $checkInFolder

Path to folder

Returns

string

checkHash()

checkHash(String  $outputData, String  $hash) : boolean

Check if the hash seems to correspond to the serialized data.

Parameters

String $outputData

serialized data

String $hash

Id to check

Returns

boolean