Version 5.0.0 release
This commit is contained in:
1 parent
90e8c7e903
commit
a3a4a9ccbd
651 files changed
+7275
-9481
No files matched your search
@@ -167,11 +167,11 @@ abstract class Controller
|
||||
{
|
||||
preg_match( '/^IPS\\\(.+?)\\\api\\\(.+?)$/', get_called_class(), $matches );
|
||||
|
||||
$shouldLog = $this->shouldLog( $matches[1], $matches[2], "{$method}{$endpointData['endpoint']}" );
|
||||
if ( !$this->canAccess( $matches[1], $matches[2], "{$method}{$endpointData['endpoint']}" ) )
|
||||
{
|
||||
throw new Exception( 'NO_PERMISSION', '2S291/7', 403, 'insufficient_scope' );
|
||||
}
|
||||
$shouldLog = $this->shouldLog( $matches[1], $matches[2], "{$method}{$endpointData['endpoint']}" );
|
||||
|
||||
$reflection = new ReflectionMethod( $this, "{$method}{$endpointData['endpoint']}" );
|
||||
$docBlock = static::decodeDocblock( $reflection->getDocComment() );
|
||||
|
||||
@@ -38,7 +38,7 @@ class PaginatedResponse extends Response
|
||||
/**
|
||||
* @brief Iterator (usually a select query)
|
||||
*/
|
||||
protected ?Iterator $iterator = null;
|
||||
protected Iterator|array|null $iterator = null;
|
||||
|
||||
/**
|
||||
* @brief Current page
|
||||
@@ -77,7 +77,7 @@ class PaginatedResponse extends Response
|
||||
* @param int|null $perPage Number of results per page
|
||||
* @return void
|
||||
*/
|
||||
public function __construct( int $httpCode, Iterator $iterator, int $page, string $activeRecordClass, ?int $count, ?Member $authorizedMember = NULL, ?int $perPage=NULL )
|
||||
public function __construct( int $httpCode, Iterator|array $iterator, int $page, string $activeRecordClass, ?int $count, ?Member $authorizedMember = NULL, ?int $perPage=NULL )
|
||||
{
|
||||
$this->httpCode = $httpCode;
|
||||
$this->page = $page > 0 ? $page : 1;
|
||||
|
||||
Reference in new issue
Block a user