for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* Factory.php - Jaxon Request Factory
*
* Create Jaxon client side requests to a given class.
* @package jaxon-core
* @author Thierry Feuzeu <[email protected]>
* @copyright 2016 Thierry Feuzeu <[email protected]>
* @license https://opensource.org/licenses/BSD-3-Clause BSD 3-Clause License
* @link https://github.com/jaxon-php/jaxon-core
*/
namespace Jaxon\Factory\CallableObject;
use Jaxon\DI\Container;
use Jaxon\Request\Support\CallableObject;
class Portable
{
* The callable object this factory is attached to
* @var CallableObject
private $xCallable;
* Create a new Factory instance.
* @return void
@return
Adding a @return annotation to a constructor is not recommended, since a constructor does not have a meaningful return value.
Please refer to the PHP core documentation on constructors.
public function __construct(CallableObject $xCallable)
$this->xCallable = $xCallable;
}
* Generate the corresponding javascript code for a call to any method
* @return string
public function __call($sMethod, $aArguments)
// Make the request
$factory = Container::getInstance()->getRequestFactory()->setCallable($this->xCallable);
return call_user_func_array([$factory, 'call'], array_merge([$sMethod], $aArguments));
Adding a
@return
annotation to a constructor is not recommended, since a constructor does not have a meaningful return value.Please refer to the PHP core documentation on constructors.