forked from phalcon/phalcon
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(builder): refactor from zephir.
- Loading branch information
1 parent
85be6de
commit 2b15c81
Showing
15 changed files
with
207 additions
and
668 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
<?php | ||
|
||
/* | ||
/** | ||
* This file is part of the Phalcon Framework. | ||
* | ||
* (c) Phalcon Team <[email protected]> | ||
|
@@ -16,7 +16,6 @@ | |
use Phalcon\Mvc\ModelInterface; | ||
|
||
/** | ||
* Phalcon\Mvc\Model\QueryInterface | ||
* Interface for Phalcon\Mvc\Model\Query | ||
*/ | ||
interface QueryInterface | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
<?php | ||
|
||
/* | ||
/** | ||
* This file is part of the Phalcon Framework. | ||
* | ||
* (c) Phalcon Team <[email protected]> | ||
|
@@ -17,9 +17,6 @@ | |
use Phalcon\Paginator\Repository; | ||
use Phalcon\Paginator\RepositoryInterface; | ||
|
||
/** | ||
* Phalcon\Paginator\Adapter\AbstractAdapter | ||
*/ | ||
abstract class AbstractAdapter implements AdapterInterface | ||
{ | ||
/** | ||
|
@@ -60,7 +57,7 @@ abstract class AbstractAdapter implements AdapterInterface | |
public function __construct(array $config) | ||
{ | ||
$this->repository = new Repository(); | ||
$this->config = $config; | ||
$this->config = $config; | ||
|
||
if (isset($config["limit"])) { | ||
$this->setLimit( | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,21 @@ | ||
<?php | ||
|
||
/* | ||
/** | ||
* This file is part of the Phalcon Framework. | ||
* | ||
* (c) Phalcon Team <[email protected]> | ||
* | ||
* For the full copyright and license information, please view the LICENSE.txt | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Phalcon\Paginator\Adapter; | ||
|
||
use Phalcon\Paginator\RepositoryInterface; | ||
|
||
/** | ||
* Phalcon\Paginator\Adapter\Model | ||
* This adapter allows to paginate data using a Phalcon\Mvc\Model resultset as a | ||
* base. | ||
* ```php | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,14 @@ | ||
<?php | ||
|
||
/* | ||
/** | ||
* This file is part of the Phalcon Framework. | ||
* | ||
* (c) Phalcon Team <[email protected]> | ||
* | ||
* For the full copyright and license information, please view the LICENSE.txt | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Phalcon\Paginator\Adapter; | ||
|
@@ -16,10 +17,11 @@ | |
use Phalcon\Paginator\RepositoryInterface; | ||
|
||
/** | ||
* Phalcon\Paginator\Adapter\NativeArray | ||
* Pagination using a PHP array as source of data | ||
* | ||
* ```php | ||
* use Phalcon\Paginator\Adapter\NativeArray; | ||
* | ||
* $paginator = new NativeArray( | ||
* [ | ||
* "data" => [ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,14 @@ | ||
<?php | ||
|
||
/* | ||
/** | ||
* This file is part of the Phalcon Framework. | ||
* | ||
* (c) Phalcon Team <[email protected]> | ||
* | ||
* For the full copyright and license information, please view the LICENSE.txt | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Phalcon\Paginator; | ||
|
@@ -16,15 +17,20 @@ | |
use Phalcon\Traits\Helper\Str\CamelizeTrait; | ||
|
||
/** | ||
* Phalcon\Paginator\Repository | ||
* Repository of current state Phalcon\Paginator\AdapterInterface::paginate() | ||
*/ | ||
class Repository implements RepositoryInterface, JsonSerializable | ||
{ | ||
use CamelizeTrait; | ||
|
||
/** | ||
* @var array | ||
*/ | ||
protected array $aliases = []; | ||
|
||
/** | ||
* @var array | ||
*/ | ||
protected array $properties = []; | ||
|
||
/** | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
<?php | ||
|
||
/* | ||
/** | ||
* This file is part of the Phalcon Framework. | ||
* | ||
* (c) Phalcon Team <[email protected]> | ||
|
@@ -19,14 +19,14 @@ | |
*/ | ||
interface RepositoryInterface | ||
{ | ||
public const PROPERTY_CURRENT_PAGE = 'current'; | ||
public const PROPERTY_FIRST_PAGE = 'first'; | ||
public const PROPERTY_ITEMS = 'items'; | ||
public const PROPERTY_LAST_PAGE = 'last'; | ||
public const PROPERTY_LIMIT = 'limit'; | ||
public const PROPERTY_NEXT_PAGE = 'next'; | ||
public const PROPERTY_CURRENT_PAGE = 'current'; | ||
public const PROPERTY_FIRST_PAGE = 'first'; | ||
public const PROPERTY_ITEMS = 'items'; | ||
public const PROPERTY_LAST_PAGE = 'last'; | ||
public const PROPERTY_LIMIT = 'limit'; | ||
public const PROPERTY_NEXT_PAGE = 'next'; | ||
public const PROPERTY_PREVIOUS_PAGE = 'previous'; | ||
public const PROPERTY_TOTAL_ITEMS = 'total_items'; | ||
public const PROPERTY_TOTAL_ITEMS = 'total_items'; | ||
|
||
/** | ||
* Gets the aliases for properties repository | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.