for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* Factory.php - Trait for Jaxon Request Factory
*
* Make functions of the Jaxon Request Factory class available to Jaxon classes.
* @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\Request\Traits;
trait Factory
{
* Return the javascript call to an Jaxon object method
* @param string $sMethod The method (without class) name
* @param ... $xParams The parameters of the method
* @return object
public function call($sMethod)
$sMethod
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.
$aArgs = func_get_args();
// Make the request
return call_user_func_array([rq(get_class()), 'call'], $aArgs);
}
* Make the pagination links for a registered Jaxon class method
* @param integer $nItemsTotal the total number of items
* @param integer $nItemsPerPage the number of items per page
* @param integer $nCurrentPage the current page
* @param string $sMethod the name of the method
* @param ... $parameters the parameters of the method
* @return string the pagination links
public function paginate($nItemsTotal, $nItemsPerPage, $nCurrentPage, $sMethod)
$nItemsTotal
$nItemsPerPage
$nCurrentPage
return call_user_func_array([rq(get_class()), 'paginate'], $aArgs);
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.