vB_Api_ContentType
extends vB_Api
in package
vB_Api_ContentType
Tags
Table of Contents
Constants
- OLDTYPE_ARTICLEATTACHMENT = 9968
- OLDTYPE_BLOGATTACHMENT = 9974
- OLDTYPE_BLOGCHANNEL = 9973
- OLDTYPE_BLOGCHANNEL_PRE502a2 = 9999
- OLDTYPE_BLOGRESPONSE = 9984
- OLDTYPE_BLOGRESPONSE_502a2 = 9971
- OLDTYPE_BLOGRESPONSE_PRE502a2 = 9984
- OLDTYPE_BLOGSTARTER = 9972
- OLDTYPE_BLOGSTARTER_PRE502a2 = 9985
- OLDTYPE_CMS_ARTICLE = 9969
- OLDTYPE_CMS_COMMENT = 9967
- OLDTYPE_CMS_SECTION = 9970
- OLDTYPE_CMS_STATICPAGE = 9966
- OLDTYPE_ORPHAN_INFRACTION_POST = 9978
- OLDTYPE_ORPHAN_INFRACTION_PROFILE = 9977
- OLDTYPE_ORPHAN_INFRACTION_THREAD = 9979
- OLDTYPE_PHOTO = 9986
- OLDTYPE_PMRESPONSE = 9981
- OLDTYPE_PMSTARTER = 9989
- OLDTYPE_POLL = 9011
- OLDTYPE_POSTATTACHMENT = 9990
- OLDTYPE_SGGALLERY = 9983
- OLDTYPE_SGPHOTO = 9987
- OLDTYPE_THREADATTACHMENT = 9982
Methods
- __serialize() : array<string|int, mixed>
- __sleep() : array<string|int, mixed>
- __unserialize() : void
- __wakeup() : void
- callNamed() : The
- Call the given api function by name with a named arguments list.
- checkApiState() : mixed
- This method checks whether the API method is enabled.
- clearCache() : mixed
- Clears all previously loaded API objects.
- fetchContentTypeClassFromId() : string
- Returns the class name for for the given content type id
- fetchContentTypeIdFromClass() : int
- Returns the integer content type id for the given content type class name
- getApiClassName() : mixed
- instance() : vB_Api
- Returns an instance of the API object which translates exceptions to an array Use this method for API clients.
- instanceInternal() : vB_Api
- Returns an instance of the API object which doesn't handle exceptions This should only be used in other API objects, not for clients of the API
- map_vb4_input_to_vb5() : string
- Returns vb5 api method name.
- map_vb5_errors_to_vb4() : mixed
- Alters the error array in any way necessary to interface correctly with vb4.
- map_vb5_output_to_vb4() : mixed
- Alters the output array in any way necessary to interface correctly with vb4.
Constants
OLDTYPE_ARTICLEATTACHMENT
public
mixed
OLDTYPE_ARTICLEATTACHMENT
= 9968
OLDTYPE_BLOGATTACHMENT
public
mixed
OLDTYPE_BLOGATTACHMENT
= 9974
OLDTYPE_BLOGCHANNEL
public
mixed
OLDTYPE_BLOGCHANNEL
= 9973
OLDTYPE_BLOGCHANNEL_PRE502a2
public
mixed
OLDTYPE_BLOGCHANNEL_PRE502a2
= 9999
OLDTYPE_BLOGRESPONSE
public
mixed
OLDTYPE_BLOGRESPONSE
= 9984
OLDTYPE_BLOGRESPONSE_502a2
public
mixed
OLDTYPE_BLOGRESPONSE_502a2
= 9971
OLDTYPE_BLOGRESPONSE_PRE502a2
public
mixed
OLDTYPE_BLOGRESPONSE_PRE502a2
= 9984
OLDTYPE_BLOGSTARTER
public
mixed
OLDTYPE_BLOGSTARTER
= 9972
OLDTYPE_BLOGSTARTER_PRE502a2
public
mixed
OLDTYPE_BLOGSTARTER_PRE502a2
= 9985
OLDTYPE_CMS_ARTICLE
public
mixed
OLDTYPE_CMS_ARTICLE
= 9969
OLDTYPE_CMS_COMMENT
public
mixed
OLDTYPE_CMS_COMMENT
= 9967
OLDTYPE_CMS_SECTION
public
mixed
OLDTYPE_CMS_SECTION
= 9970
OLDTYPE_CMS_STATICPAGE
public
mixed
OLDTYPE_CMS_STATICPAGE
= 9966
OLDTYPE_ORPHAN_INFRACTION_POST
public
mixed
OLDTYPE_ORPHAN_INFRACTION_POST
= 9978
OLDTYPE_ORPHAN_INFRACTION_PROFILE
public
mixed
OLDTYPE_ORPHAN_INFRACTION_PROFILE
= 9977
OLDTYPE_ORPHAN_INFRACTION_THREAD
public
mixed
OLDTYPE_ORPHAN_INFRACTION_THREAD
= 9979
OLDTYPE_PHOTO
public
mixed
OLDTYPE_PHOTO
= 9986
OLDTYPE_PMRESPONSE
public
mixed
OLDTYPE_PMRESPONSE
= 9981
OLDTYPE_PMSTARTER
public
mixed
OLDTYPE_PMSTARTER
= 9989
OLDTYPE_POLL
public
mixed
OLDTYPE_POLL
= 9011
OLDTYPE_POSTATTACHMENT
public
mixed
OLDTYPE_POSTATTACHMENT
= 9990
OLDTYPE_SGGALLERY
public
mixed
OLDTYPE_SGGALLERY
= 9983
OLDTYPE_SGPHOTO
public
mixed
OLDTYPE_SGPHOTO
= 9987
OLDTYPE_THREADATTACHMENT
public
mixed
OLDTYPE_THREADATTACHMENT
= 9982
Methods
__serialize()
public
__serialize() : array<string|int, mixed>
Return values
array<string|int, mixed>__sleep()
public
__sleep() : array<string|int, mixed>
Return values
array<string|int, mixed>__unserialize()
public
__unserialize(array<string|int, mixed> $serialized) : void
Parameters
- $serialized : array<string|int, mixed>
__wakeup()
public
__wakeup() : void
callNamed()
Call the given api function by name with a named arguments list.
public
callNamed() : The
Used primarily to translate REST requests into API calls.
Return values
The —return of the method or an error if the method doesn't exist, or is static, a constructor or destructor, or otherwise shouldn't be callable as and API method. It is also an error if the value of a paramater is not provided and that parameter doesn't have a default value.
checkApiState()
This method checks whether the API method is enabled.
public
checkApiState(mixed $method) : mixed
For extensions check make sure $controller property is already set.
Parameters
- $method : mixed
clearCache()
Clears all previously loaded API objects.
public
static clearCache() : mixed
Intended for use in tests where the loading pattern can cause issues with objects that cache thier own data.
fetchContentTypeClassFromId()
Returns the class name for for the given content type id
public
fetchContentTypeClassFromId(mixed $contenttypeid) : string
Parameters
- $contenttypeid : mixed
Return values
string —Content Type Class Name
fetchContentTypeIdFromClass()
Returns the integer content type id for the given content type class name
public
fetchContentTypeIdFromClass(mixed $class[, mixed $package = 'vBForum' ]) : int
Parameters
- $class : mixed
- $package : mixed = 'vBForum'
Return values
int —Content Type ID
getApiClassName()
public
static getApiClassName(mixed $controller) : mixed
Parameters
- $controller : mixed
instance()
Returns an instance of the API object which translates exceptions to an array Use this method for API clients.
public
static instance(string $controller[, bool $refresh_cache = false ]) : vB_Api
Parameters
- $controller : string
-
-- name of the API controller to load
- $refresh_cache : bool = false
-
-- true if we want to force the cache to update with a new api object primarily intended for testing
Return values
vB_ApiinstanceInternal()
Returns an instance of the API object which doesn't handle exceptions This should only be used in other API objects, not for clients of the API
public
static instanceInternal(string $controller[, bool $refresh_cache = false ]) : vB_Api
Parameters
- $controller : string
-
-- name of the API controller to load
- $refresh_cache : bool = false
-
-- true if we want to force the cache to update with a new api object primarily intended for testing
Return values
vB_Apimap_vb4_input_to_vb5()
Returns vb5 api method name.
public
static map_vb4_input_to_vb5(string $method, array<string|int, mixed> &$request) : string
May alter request array.
Parameters
- $method : string
-
-- vb4 method name
- $request : array<string|int, mixed>
-
-- $_REQUEST array for this api request
Return values
stringmap_vb5_errors_to_vb4()
Alters the error array in any way necessary to interface correctly with vb4.
public
static map_vb5_errors_to_vb4(string $method, array<string|int, mixed> &$data) : mixed
Parameters
- $method : string
-
-- vb4 method name
- $data : array<string|int, mixed>
-
-- error array from vb5
map_vb5_output_to_vb4()
Alters the output array in any way necessary to interface correctly with vb4.
public
static map_vb5_output_to_vb4(string $method, array<string|int, mixed> &$data) : mixed
Parameters
- $method : string
-
-- vb4 method name
- $data : array<string|int, mixed>
-
-- output array from vb5