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

added a view-helper to get the primary-language #106

Merged

Conversation

kokspflanze
Copy link
Contributor

maybe other ppl need it too =)

@coveralls
Copy link

coveralls commented Mar 21, 2019

Coverage Status

Coverage increased (+0.06%) to 68.085% when pulling 81fa578 on kokspflanze:feature/primary-language-viewhelper into 23165f8 on basz:develop.

Copy link
Collaborator

@svycka svycka left a comment

Choose a reason for hiding this comment

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

I am not sure we need this helper but I guess you have a use case if you created this PR :)

can you rebase to develop branch?

*/
namespace SlmLocale\Service;

use Interop\Container\ContainerInterface;
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think this can be Psr\Container\ContainerInterface as we require ServiceManager ^3.2

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Zend\ServiceManager\Factory\FactoryInterface is still using Interop\Container\ContainerInterface

Copy link
Collaborator

Choose a reason for hiding this comment

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

hmm, it looks we need to update servicemanager because they support PSR only from 3.4.0 but I guess if this is final we can change this anytime.

use SlmLocale\View\Helper\PrimaryLanguage;
use Zend\ServiceManager\Factory\FactoryInterface;

class PrimaryLanguageHelperFactory implements FactoryInterface
Copy link
Collaborator

Choose a reason for hiding this comment

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

why do we need to implement FactoryInterface? also, make factory final

Copy link
Contributor Author

Choose a reason for hiding this comment

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

the factory 'FactoryInterface' is for me zf standard

use Locale;
use Zend\View\Helper\AbstractHelper;

class PrimaryLanguage extends AbstractHelper
Copy link
Collaborator

Choose a reason for hiding this comment

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

make it final class

@svycka
Copy link
Collaborator

svycka commented Mar 26, 2019

still not rebased to develop. Will do when I merge.

@svycka svycka force-pushed the feature/primary-language-viewhelper branch from 45870a6 to 81fa578 Compare March 26, 2019 07:04
@svycka svycka changed the base branch from master to develop March 26, 2019 07:06
@svycka svycka merged commit 42876bd into basz:develop Mar 26, 2019
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.

3 participants