MetaFox

TypeManager
in package
implements TypeManager

Class TypeManager.

Table of Contents

Interfaces

TypeManager

Constants

CACHE_LIFETIME  = 3000
CACHE_NAME  = 'search_type_manager_cache'

Properties

$types  : mixed

Methods

__construct()  : mixed
getTypePhrase()  : string|null
hasFeature()  : bool
hasSetting()  : bool
isActive()  : bool
makeType()  : Type|false
Create or update an activity type.
refresh()  : void
start()  : void

Constants

CACHE_NAME

private string CACHE_NAME = 'search_type_manager_cache'

Properties

Methods

getTypePhrase()

public getTypePhrase(string $type) : string|null
Parameters
$type : string
Return values
string|null

hasFeature()

public hasFeature(string $type, string $feature) : bool
Parameters
$type : string
$feature : string
Return values
bool

hasSetting()

public hasSetting(string $type, string $feature) : bool
Parameters
$type : string
$feature : string
Return values
bool

isActive()

public isActive(string $type) : bool
Parameters
$type : string
Return values
bool

makeType()

Create or update an activity type.

public makeType(array<string, mixed> $data) : Type|false

Note: this method won't purge cache. Please purge cache manually.

Parameters
$data : array<string, mixed>
Return values
Type|false

refresh()

public refresh() : void
Tags
throws
InvalidArgumentException

        
On this page

Search results