Skip to content
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

[POC] Allow arbitrary "misc" pages #370

Merged
merged 1 commit into from
Jul 9, 2021
Merged

Conversation

ogizanagi
Copy link
Member

@ogizanagi ogizanagi commented Jul 1, 2021

POC for StenopePHP/Stenope#91 (comment)

Such content pages allows any properties by relying on \stdClass specificities.
It just need creating once a class extending \stdClass.
Then, any content, with various and different properties can be loaded with the content manager with its slug:

$manager->getContent(Misc::class, 'elaomojis')

Capture d’écran 2021-07-01 à 10 09 37

@ogizanagi ogizanagi requested a review from Tom32i July 1, 2021 08:15
github-actions bot pushed a commit that referenced this pull request Jul 1, 2021
@ogizanagi ogizanagi force-pushed the stdClass-misc-pages branch from a4f5568 to 99c7946 Compare July 1, 2021 08:20
github-actions bot pushed a commit that referenced this pull request Jul 1, 2021
@ogizanagi ogizanagi changed the title Allow arbitrary "misc" pages [POC] Allow arbitrary "misc" pages Jul 1, 2021
POC for StenopePHP/Stenope#91 (comment)

Such content pages allows any properties by relying on \stdClass
specificities.
It just need creating once a class extending \stdClass. Then, any
content, with various and different properties can be loaded with the
content manager with its slug:

```php
$manager->getContent(Misc::class, 'elaomojis')
```
@ogizanagi ogizanagi force-pushed the stdClass-misc-pages branch from 99c7946 to 5022b14 Compare July 1, 2021 10:36
github-actions bot pushed a commit that referenced this pull request Jul 1, 2021
@ogizanagi ogizanagi marked this pull request as draft July 5, 2021 11:37
Base automatically changed from elaomojis to master July 9, 2021 06:46
@ogizanagi ogizanagi marked this pull request as ready for review July 9, 2021 07:53
github-actions bot pushed a commit that referenced this pull request Jul 9, 2021
@ogizanagi ogizanagi merged commit adabe75 into master Jul 9, 2021
@ogizanagi ogizanagi deleted the stdClass-misc-pages branch July 9, 2021 07:57
github-actions bot pushed a commit that referenced this pull request Jul 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant