-
Notifications
You must be signed in to change notification settings - Fork 25
feat(php): Generate remaining PHP clients with PHP docs APIC-327 #327
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
51 commits
Select commit
Hold shift + click to select a range
1558057
feat: add recommend models
damcou bb780ab
Merge branch 'main' into feat/APIC-355/php-models-returns
damcou 604dee4
feat(php): enhance PHP doc and regenerate models
damcou 8d3497b
feat(php): add models
damcou 156fbde
Merge branch 'main' into feat/APIC-355/php-models-returns
damcou 067d2d0
feat(php): updated generate.ts
damcou 2c0d5be
Merge branch 'main' into feat/APIC-355/php-models-returns
damcou c6ae5ca
feat(php): delete generated files
damcou f070d7b
feat(php): checkout the clients
damcou fecebbf
feat(php): fix generate script
damcou d919515
feat(php): Update Abtesting folder name
damcou 0430431
Merge branch 'main' into feat/APIC-355/php-models-returns
damcou 100b8a9
feat(php): Update CI cache for PHP models
damcou 55f2835
Merge branch 'main' into feat/APIC-355/php-models-returns
damcou 79b8483
Merge branch 'feat/APIC-355/php-models-returns' of https://github.com…
damcou cd5f6b6
feat(php): Update CI cache for PHP models (paths)
damcou f5801e8
feat(php): Update check.yml file with PHP path
damcou ed67777
feat(php): Bump cache to 7.0.3
damcou 817ced9
Merge branch 'main' into feat/APIC-355/php-models-returns
damcou 0a43166
Merge branch 'main' into feat/APIC-355/php-models-returns
damcou 78646dd
Merge branch 'main' into feat/APIC-355/php-models-returns
damcou 944f98d
Merge branch 'main' into feat/APIC-355/php-models-returns
damcou edc998f
feat: add recommend models
damcou 63584dd
feat(php): enhance PHP doc and regenerate models
damcou ea88a1c
feat(php): add models
damcou 52227c1
feat(php): updated generate.ts
damcou 8496087
feat(php): delete generated files
damcou e0eaa38
feat(php): fix generate script
damcou 35f5837
feat(php): Update Abtesting folder name
damcou 257f314
feat(php): Update CI cache for PHP models
damcou 83937b7
feat(php): Update CI cache for PHP models (paths)
damcou 2f3633f
feat(php): Update check.yml file with PHP path
damcou 63fcdf1
feat(php): Bump cache to 7.0.3
damcou 035b9f7
rebase main
shortcuts 87c53a5
fix config name
shortcuts ff4c6c6
Merge branch 'main' into feat/APIC-355/php-models-returns
damcou 60448b9
feat(php): Model cleaning
damcou 8b86cf7
Merge branch 'main' into feat/APIC-355/php-models-returns
damcou 59e4a91
Merge branch 'feat/APIC-355/php-models-returns' of https://github.com…
damcou 1c1ca6c
Merge branch 'feat/APIC-355/php-models-returns' of https://github.com…
damcou 88d842b
Merge branch 'main' into feat/APIC-355/php-models-returns
damcou f34d571
feat(php): remove unused dep
damcou c0e7cc4
Merge branch 'main' into feat/APIC-355/php-models-returns
damcou d9b346d
feat(php): model changes after review
damcou 6618aca
Merge branch 'feat/APIC-355/php-models-returns' of https://github.com…
damcou f2c7f9d
Update clients/algoliasearch-client-php/lib/Model/AbstractModel.php
damcou 98ce634
Merge branch 'main' into feat/APIC-355/php-models-returns
damcou 46bfecd
feat(php): fix unwanted space
damcou ccfc187
feat(php): script changes after review
damcou 83a01b2
feat(php): linter
damcou b87b4b4
Merge branch 'main' into feat/APIC-355/php-models-returns
damcou File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 |
---|---|---|
|
@@ -6,8 +6,6 @@ | |
|
||
docs/** | ||
test/** | ||
lib/Model/** | ||
lib/Model/ | ||
|
||
.travis.yml | ||
README.md | ||
|
This file contains hidden or 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 hidden or 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
50 changes: 50 additions & 0 deletions
50
clients/algoliasearch-client-php/lib/Model/AbstractModel.php
This file contains hidden or 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 |
---|---|---|
@@ -0,0 +1,50 @@ | ||
<?php | ||
damcou marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
namespace Algolia\AlgoliaSearch\Model; | ||
|
||
use \Algolia\AlgoliaSearch\ObjectSerializer; | ||
|
||
/** | ||
* Abstract class extended by each models | ||
* | ||
* @category Class | ||
* @package Algolia\AlgoliaSearch | ||
*/ | ||
abstract class AbstractModel | ||
{ | ||
/** | ||
* Serializes the object to a value that can be serialized natively by json_encode(). | ||
* | ||
* @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php | ||
* | ||
* @return mixed returns data which can be serialized by json_encode(), which is a value | ||
* of any type other than a resource | ||
*/ | ||
public function jsonSerialize() | ||
{ | ||
return ObjectSerializer::sanitizeForSerialization($this); | ||
} | ||
|
||
/** | ||
* Gets the string presentation of the object | ||
* | ||
* @return string | ||
*/ | ||
public function __toString() | ||
{ | ||
return json_encode( | ||
ObjectSerializer::sanitizeForSerialization($this), | ||
JSON_PRETTY_PRINT | ||
); | ||
} | ||
|
||
/** | ||
* Gets a header-safe presentation of the object | ||
* | ||
* @return string | ||
*/ | ||
public function toHeaderValue() | ||
{ | ||
return json_encode(ObjectSerializer::sanitizeForSerialization($this)); | ||
} | ||
} |
This file contains hidden or 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 hidden or 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 hidden or 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
22 changes: 4 additions & 18 deletions
22
...asearch-client-php/lib/ModelInterface.php → templates/php/ModelInterface.mustache
This file contains hidden or 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 hidden or 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 hidden or 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 |
---|---|---|
@@ -0,0 +1 @@ | ||
['{{{baseName}}}'] => ({{#isString}}string{{/isString}}{{#isInteger}}int{{/isInteger}}{{#isBoolean}}bool{{/isBoolean}}{{^isString}}{{^isInteger}}{{^isBoolean}}array{{/isBoolean}}{{/isInteger}}{{/isString}}) {{{description}}}{{#required}} (required){{/required}} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.