mirror of
https://github.com/Mibew/mibew.git
synced 2025-04-07 08:40:11 +03:00
Use the same declaration for *Processor::call methods
This commit is contained in:
parent
7bb7a388b8
commit
cab8caac90
@ -30,13 +30,27 @@ abstract class ClientSideProcessor extends AbstractProcessor
|
|||||||
/**
|
/**
|
||||||
* Call function at client side
|
* Call function at client side
|
||||||
*
|
*
|
||||||
|
* WARNING: This processor does not support synchronous requests.
|
||||||
|
*
|
||||||
* @param array $functions Array of functions to call. See Mibew API for
|
* @param array $functions Array of functions to call. See Mibew API for
|
||||||
* details.
|
* details.
|
||||||
|
* @param boolean $async True for asynchronous requests and false for
|
||||||
|
* synchronous request
|
||||||
* @param array|null $callback callback array for synchronous requests.
|
* @param array|null $callback callback array for synchronous requests.
|
||||||
* @return mixed request result or boolean false on failure.
|
* @return mixed request result or boolean false on failure.
|
||||||
|
* @see \Mibew\RequestProcessor\AbstractProcessor
|
||||||
*/
|
*/
|
||||||
public function call($functions, $callback = null)
|
public function call($functions, $async, $callback = null)
|
||||||
{
|
{
|
||||||
|
if (!$async) {
|
||||||
|
trigger_error(
|
||||||
|
'Synchronous requests are not supported.',
|
||||||
|
E_USER_WARNING
|
||||||
|
);
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
return parent::call($functions, true, $callback);
|
return parent::call($functions, true, $callback);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1139,7 +1139,8 @@ class Thread
|
|||||||
protected function setupAvatar($link)
|
protected function setupAvatar($link)
|
||||||
{
|
{
|
||||||
$processor = ThreadProcessor::getInstance();
|
$processor = ThreadProcessor::getInstance();
|
||||||
$processor->call(array(
|
$processor->call(
|
||||||
|
array(
|
||||||
array(
|
array(
|
||||||
'function' => 'setupAvatar',
|
'function' => 'setupAvatar',
|
||||||
'arguments' => array(
|
'arguments' => array(
|
||||||
@ -1151,6 +1152,8 @@ class Thread
|
|||||||
'imageLink' => $link,
|
'imageLink' => $link,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
));
|
),
|
||||||
|
true
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user