mirror of
				https://github.com/Mibew/mibew.git
				synced 2025-11-04 12:25: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
 | 
			
		||||
     *
 | 
			
		||||
     * WARNING: This processor does not support synchronous requests.
 | 
			
		||||
     *
 | 
			
		||||
     * @param array $functions Array of functions to call. See Mibew API for
 | 
			
		||||
     * details.
 | 
			
		||||
     * @param boolean $async True for asynchronous requests and false for
 | 
			
		||||
     *   synchronous request
 | 
			
		||||
     * @param array|null $callback callback array for synchronous requests.
 | 
			
		||||
     * @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);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -1139,18 +1139,21 @@ class Thread
 | 
			
		||||
    protected function setupAvatar($link)
 | 
			
		||||
    {
 | 
			
		||||
        $processor = ThreadProcessor::getInstance();
 | 
			
		||||
        $processor->call(array(
 | 
			
		||||
        $processor->call(
 | 
			
		||||
            array(
 | 
			
		||||
                'function' => 'setupAvatar',
 | 
			
		||||
                'arguments' => array(
 | 
			
		||||
                    'threadId' => $this->id,
 | 
			
		||||
                    'token' => $this->lastToken,
 | 
			
		||||
                    'return' => array(),
 | 
			
		||||
                    'references' => array(),
 | 
			
		||||
                    'recipient' => 'user',
 | 
			
		||||
                    'imageLink' => $link,
 | 
			
		||||
                array(
 | 
			
		||||
                    'function' => 'setupAvatar',
 | 
			
		||||
                    'arguments' => array(
 | 
			
		||||
                        'threadId' => $this->id,
 | 
			
		||||
                        'token' => $this->lastToken,
 | 
			
		||||
                        'return' => array(),
 | 
			
		||||
                        'references' => array(),
 | 
			
		||||
                        'recipient' => 'user',
 | 
			
		||||
                        'imageLink' => $link,
 | 
			
		||||
                    ),
 | 
			
		||||
                ),
 | 
			
		||||
            ),
 | 
			
		||||
        ));
 | 
			
		||||
            true
 | 
			
		||||
        );
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user