Documentation

GeneralFunctions
in package

Description of GeneralFunctions

Tags
author

nczirjak

Table of Contents

Properties

$config  : mixed
$repoDb  : mixed

Methods

__construct()  : mixed
detailViewUrlDecodeEncode()  : string
Encode or decode the detail view url
getDissServices()  : array<string|int, mixed>
Get the dissemination services
getRepoIdFromApiUrl()  : string
handleShibbolethUser()  : void
Handle the default shibboleth user for the federated login
initClarinVcrUrl()  : string
jsonDecodeData()  : array<string|int, mixed>
Return the json decoded string
checkEmail()  : bool
check the string for email address
checkShibbolethGroup()  : void
Check the shibboleth user role exists or not
createShibbiolethUserPwd()  : string
Generate a new custom password for the new shibboleth drupal user
createShibbolethUser()  : void
create the shibboleth users drupal user
createShobbolethGroup()  : void
Create the shibboleth user role
loadTheUserData()  : void
Load the user from the drupal db
replaceIdString()  : string
Format the URL identifier to SQL QUERY acceptable format (adding http/https) And if it is a special identifier then we query the acdh identifier
specialIdentifierToUUID()  : string
This function is get the acdh identifier by the PID, because all of the functions are using the identifier and not the pid :)

Properties

Methods

__construct()

public __construct([mixed $cfg = null ]) : mixed
Parameters
$cfg : mixed = null

detailViewUrlDecodeEncode()

Encode or decode the detail view url

public detailViewUrlDecodeEncode(string $data[, bool $code = 0 ]) : string
Parameters
$data : string
$code : bool = 0

: 0 - decode / 1 -encode

Return values
string

getDissServices()

Get the dissemination services

public getDissServices(string $id) : array<string|int, mixed>
Parameters
$id : string
Return values
array<string|int, mixed>

getRepoIdFromApiUrl()

public getRepoIdFromApiUrl(string $apiUrl) : string
Parameters
$apiUrl : string
Return values
string

handleShibbolethUser()

Handle the default shibboleth user for the federated login

public handleShibbolethUser([string $eppn = "" ][, string $email = "" ]) : void
Parameters
$eppn : string = ""
$email : string = ""

initClarinVcrUrl()

public initClarinVcrUrl() : string
Return values
string

jsonDecodeData()

Return the json decoded string

public jsonDecodeData(string $json) : array<string|int, mixed>
Parameters
$json : string
Return values
array<string|int, mixed>

checkEmail()

check the string for email address

private checkEmail(string $str) : bool
Parameters
$str : string
Return values
bool

checkShibbolethGroup()

Check the shibboleth user role exists or not

private checkShibbolethGroup() : void

createShibbiolethUserPwd()

Generate a new custom password for the new shibboleth drupal user

private createShibbiolethUserPwd(int $length) : string
Parameters
$length : int
Return values
string

createShibbolethUser()

create the shibboleth users drupal user

private createShibbolethUser([string $email = "" ]) : void
Parameters
$email : string = ""

createShobbolethGroup()

Create the shibboleth user role

private createShobbolethGroup() : void

loadTheUserData()

Load the user from the drupal db

private loadTheUserData(object &$shib) : void
Parameters
$shib : object

replaceIdString()

Format the URL identifier to SQL QUERY acceptable format (adding http/https) And if it is a special identifier then we query the acdh identifier

private replaceIdString(string $identifier, string $prop, string $httpProp[, bool $specialId = false ]) : string
Parameters
$identifier : string
$prop : string
$httpProp : string
$specialId : bool = false
Return values
string

specialIdentifierToUUID()

This function is get the acdh identifier by the PID, because all of the functions are using the identifier and not the pid :)

private specialIdentifierToUUID(string $identifier[, bool $pid = false ]) : string
Parameters
$identifier : string
$pid : bool = false
Return values
string

        
On this page

Search results