Skip to content
This repository was archived by the owner on May 1, 2019. It is now read-only.

Add feed mapper#414

Merged
Ocramius merged 9 commits into
zendframework:masterfrom
snapshotpl:feed
Feb 27, 2015
Merged

Add feed mapper#414
Ocramius merged 9 commits into
zendframework:masterfrom
snapshotpl:feed

Conversation

@snapshotpl

Copy link
Copy Markdown
Contributor

No description provided.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think this method is not necessary and the name don't indicates there actually return - there is no need to wrap it into a sep. method - no?

@ins0

ins0 commented Feb 23, 2015

Copy link
Copy Markdown
Contributor

@snapshotpl can u please provide tests for this feature?

@snapshotpl

Copy link
Copy Markdown
Contributor Author

@ins0 Test provided, but Travis looks dead ;)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could you please update the url too? zfmodules.com

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should create a new PR with this update in whole project

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah sounds like a better plan 💯

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@snapshotpl just searched inside the project and actually this is the only file that contains the url and needs an update ^^

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is also link in README

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe serverUrl is a best solution

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't this a View Helper?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mmm you are in Controller..
You can use

$url = $this->url()->fromRoute('home', [], ['force_canonical', true]);

@ins0 print the url into the application in my opinion is not a good idea.. But I don't remember if this solution works

PS same stuff for the setFeedLink

$url = $this->url()->fromRoute('feed', [], ['force_canonical', true]);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gianarb 👍
@snapshotpl if u like to create a new pr with the url just say otherwise i would do this 😃

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change in progress...

@ins0

ins0 commented Feb 25, 2015

Copy link
Copy Markdown
Contributor

thanks @snapshotpl for providing tests 👍 - this looks good from my point of view 😃

@snapshotpl

Copy link
Copy Markdown
Contributor Author

@ins0 @gianarb Done. I extended also feed entry data

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i would suggest to name this more explicit and not simple $url

@snapshotpl

Copy link
Copy Markdown
Contributor Author

@ins0 what about now? :)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

slightly better but still odd. how about sprintf('%s/%s', $module->getOwner(), $moduleName) or we extend the module entity to get a full repository name - but not sure about that. /cc @Ocramius @localheinz

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like idea with additional method i module entity. We can reuse it in views.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah i ike this idea as well, there should be no reason to not follow this way 👍

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the module pseudo-identifier is this one, then yes, this should be part of the Module model API

@snapshotpl

Copy link
Copy Markdown
Contributor Author

My PR needs review :-)

@snapshotpl

Copy link
Copy Markdown
Contributor Author

@ins0 who said that Module entity can come from db?

@Ocramius Ocramius self-assigned this Feb 27, 2015
Ocramius added a commit that referenced this pull request Feb 27, 2015
@Ocramius Ocramius merged commit 497251a into zendframework:master Feb 27, 2015
@Ocramius

Copy link
Copy Markdown
Member

Merged, thanks @snapshotpl!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants