Properties

$myConfig

$myConfig : object

Config object

Type

object

$oDb

$oDb : object

Database object

Type

object

Methods

getConfig()

getConfig() : object

Function to get config object

Returns

object

getDb()

getDb() : object

Function to get database object

Returns

object

findLastCustNr()

findLastCustNr() : integer

Function to find last customer number

Returns

integer

insertUser()

insertUser(\JSONstring  $userData) : string

Function to insert user

Parameters

\JSONstring $userData

json string with user details as key=>value pairs to insert. Ex: 'oxactive'=>'xxxxxx', 'oxfname'=>'xxxxxx'.

Returns

string

insertUsers()

insertUsers(\JSONstring  $sUsers) : array

Function to insert users

Parameters

\JSONstring $sUsers

json string with multiple user details as key=>value pairs to insert. Ex: 'oxactive'=>'xxxxxx', 'oxfname'=>'xxxxxx'.

Returns

array

assignUser2Group()

assignUser2Group(string  $oxid, string  $GroupId) : string

Function to assign user to a group

Parameters

string $oxid

user id to insert

string $GroupId

groupid to which user to be added

Returns

string

assignUsers2Group()

assignUsers2Group(array  $userIds, integer  $GroupId) : array

Function to assign users to group

Parameters

array $userIds

array of oxids of the users

integer $GroupId

groupid to which users to be added

Returns

array

fetchUser()

fetchUser(string  $oxid = "") : array

Function to find user

Parameters

string $oxid

oxid of the user to fetch user details.

Returns

array

fetchUsers()

fetchUsers(integer  $start, integer  $offset = 10) : array

Function to fetch users

Parameters

integer $start

start index of the fetchUsers result (optional)

integer $offset

offset index of the fetchUsers result (optional)

Returns

array

updateUser()

updateUser(\JSONstring  $userData) : boolean

Function to update user

Parameters

\JSONstring $userData

json string with user details as key=>value pairs to update. Ex: 'oxid'=>'xxxxxx', 'oxfname'=>'xxxxxx'.

Returns

boolean

updateUsers()

updateUsers(\JSONstring  $sUsers) : array

Function to update multiple users

Parameters

\JSONstring $sUsers

json string with multiple user details as key=>value pairs to update. Ex: 'oxid'=>'xxxxxx', 'oxfname'=>'xxxxxx'.

Returns

array

fetchGroupsAssigned()

fetchGroupsAssigned(string  $objectId) : array

Function to fetch groups assigned for an user

Parameters

string $objectId

userid to get the groups assigned to that

Returns

array

insertGroup()

insertGroup(\JSONstring  $GroupData) : boolean

Function to insert group

Parameters

\JSONstring $GroupData

json string with group details as key=>value pairs to insert. Ex: 'oxactive'=>'xxxxx', 'oxtitle'=>'xxxxx'.

Returns

boolean

updateGroup()

updateGroup(\JSONstring  $GroupData) : boolean

Function to update group

Parameters

\JSONstring $GroupData

json string with group details as key=>value pairs to update. Ex: 'oxid'=>'xxxxx', 'oxtitle'=>'xxxxx'.

Returns

boolean

unAssignUsers()

unAssignUsers(string  $GroupId) : null

Function to un-assign users to a group

Parameters

string $GroupId

groupId to unassign all users

Returns

null

deleteGroup()

deleteGroup(array  $GroupId) : null

Function to delete group

Parameters

array $GroupId

groupId to delete

Returns

null

fetchGroupUsers()

fetchGroupUsers(string  $GroupId) : array

Function to fetch group users

Parameters

string $GroupId

groupId to fetch users of that group

Returns

array

getMostOrderedUser()

getMostOrderedUser() : array

Function to fetch user who ordered most number of times.

Returns

array

getTopOrderedUser()

getTopOrderedUser() : array

Function to fetch user who ordered with most price.

Returns

array

getMostOrderedUserGroup()

getMostOrderedUserGroup(string  $type = null) : array

Function to fetch usergroup from which users ordered most number of times.

Parameters

string $type

type of the request like most ordered group for today, this month, this year.

Returns

array

deleteUser()

deleteUser(string  $userId) : boolean

Function to delete user based on oxid of the user

Parameters

string $userId

oxid of the user to delete

Returns

boolean

deleteUsers()

deleteUsers(array  $userIds) : integer

Function to delete multiple users based on oxid of the users

Parameters

array $userIds

oxid of the users to delete

Returns

integer —

count of deleted users

storeAppRegistration()

storeAppRegistration(\JSONstring  $client_data) : string

Function to store registration ids of app

Parameters

\JSONstring $client_data

details to be inserted for the devices

Returns

string

removeAppRegistration()

removeAppRegistration(string  $registrationId) : boolean

Function to remove registration ids of app

Parameters

string $registrationId

registration id of the app to be deleted

Returns

boolean

checkAdminUser()

checkAdminUser(string  $username) : boolean

Function to check the username of the admin

Parameters

string $username

username of the Admin to be checked

Returns

boolean

getFrequentVisitors()

getFrequentVisitors(string  $freqYear = null) : array

Function to fetch frequently visited users details based on year

Parameters

string $freqYear

year number

Returns

array

getFrequentVisitorsMonth()

getFrequentVisitorsMonth() : array

Function to fetch frequently visited users details of current month

Returns

array

getRegisteredUsersByYear()

getRegisteredUsersByYear(string  $regYear = null) : array

Function to fetch registered users count based on year

Parameters

string $regYear

year number

Returns

array

getRegisteredUsers()

getRegisteredUsers(string  $type = null) : array

Function to fetch registered users

Parameters

string $type

type of the request like today users, this month users, ..

Returns

array

getMonths()

getMonths() : array

Returns months of year

Returns

array