class civicrm_api3

This class allows to consume the API, either from within a module that knows civicrm already:

Methods

__construct(array $config = NULL)

Class constructor.

string
__toString()

Convert to string.

bool
__call($action, $params)

Perform action.

ping()

Helper method for long running programs (eg bots).

string
errorMsg()

Return the last error message.

init()

Initialize.

$this
attr($name, null $value = NULL)

Get attribute.

bool
is_error()

Is this an error.

bool
is_set(string $name)

Check if var is set.

$this
__get(string $name)

Get object.

array
values()

Or use $api->value.

array
result()

Or use $api->result.

Details

at line 86
__construct(array $config = NULL)

Class constructor.

Parameters

array $config API configuration.

at line 136
string __toString()

Convert to string.

Return Value

string

at line 148
bool __call($action, $params)

Perform action.

Parameters

$action
$params

Return Value

bool

at line 254
ping()

Helper method for long running programs (eg bots).

at line 270
string errorMsg()

Return the last error message.

Return Value

string

at line 277
init()

Initialize.

at line 289
$this attr($name, null $value = NULL)

Get attribute.

Parameters

$name
null $value

Return Value

$this

at line 306
bool is_error()

Is this an error.

Return Value

bool

at line 317
bool is_set(string $name)

Check if var is set.

Parameters

string $name

Return Value

bool

at line 328
$this __get(string $name)

Get object.

Parameters

string $name

Return Value

$this

at line 353
array values()

Or use $api->value.

Return Value

array

at line 366
array result()

Or use $api->result.

Return Value

array