What happened to the website zfmodules (was it modules.zendframework.com)?
Doesn't seem to be online anymore.
I still get an Service Temporarily Unavailable error. Who can setup
the website again?
Looks like it's back up again right here:
http://symfohub.com/bundles
Just kidding, LOL.
3. You can also test the factory.
Best regards,
Andreas
--
Andreas Möller
Web Developer
Twitter @localheinz
On 17.12.2013, at 22:34, Matthew Weier O'Phinney matt...@zend.com wrote:
On Tue, Dec 17, 2013 at 12:57 PM, MichaelB mr...@mckanes.com wrote:
Thanks Matthew for your answer
Hello, fellow developers,
this is likely a question that's framework-agnostic: how do you approach
translation of complex views?
I'm not so sure which is a bigger nightmare:
* struggling with tons of translation message ids and translations
* duplicating view scripts, splicing in the
Hello Daniel,
thanks for your feedback.
No they wouldn't, so don't pass it to setData. But I should imaging people
would want to set the value on the submit element programtically, I don't
think there is a distinction between posted form data and normal setter data,
I think that may be
Hello,
as I just encountered this: is it desirable for anyone that a submit element
gets actually populated with the requested data?
I don't think so - but because I've seen this happen I just wondered whether it
should be this way.
Best,
Andreas
--
List: fw-general@lists.zend.com
Info:
Hello!
I was just wondering how you would go about and solve the following problem:
* You've got a form with elements that should allow a user to edit data which
may have different representations depending on the currently chosen locale
(for example: floats, dates)
* Employing filters, the
Hello Matthew,
Thanks for your reply!
That's a view layer issue. In my view script, I'd extract any elements
that I know need localization, and prepare them accordingly before
rendering them. This might involve extracting the value, localizing
it, and then passing it back into the element,
No, it should not return a DateTime, as that would break backwards
compatibility. Introduce alternate formatters/filters if you would
like that behavior.
How about the NumberFormatter - same thing?
Best regards,
Andreas
--
List: fw-general@lists.zend.com
Info:
Hello group,
not so sure about this, but I see the following related to
* https://github.com/zendframework/zf2/pull/4495
* https://github.com/zendframework/zf2/issues/4493
Should the DateTimeFormatter, when passed a string from which an instance of
DateTime could be created, return a
Hello Marco,
I've opened an issue, here it is
* https://github.com/zendframework/zf2/issues/4493
Best regards,
Andreas
--
List: fw-general@lists.zend.com
Info: http://framework.zend.com/archives
Unsubscribe: fw-general-unsubscr...@lists.zend.com
Is it just me, or does the NumberFormat filter almost always return a string,
even if a string was passed to it that could successfully parsed?
Best regards,
Andreas
--
List: fw-general@lists.zend.com
Info: http://framework.zend.com/archives
Unsubscribe: fw-general-unsubscr...@lists.zend.com
Did you already check
https://github.com/zendframework/zf2/blob/master/tests/ZendTest/I18n/Filter/NumberFormatTest.php
?
That's where I looked in the first place and figured from the second test and
the data provider, that when a parseable string is passed, a float should be
returned.
return str_replace(\xC2\xA0, ' ', $result);
Always returns a string.
I sort them alphabetically and that's how PhpStorm does it, too.
Otherwise, as far as I can tell, PHP FIG does not give a recommendation.
However, I believe that sorting them alphabetically gives you a good overview.
Best,
Andreas
--
List: fw-general@lists.zend.com
Info:
If you are using PHP 5.4, you could mix in a trait (e.g.,
EntityManagerCapableTrait) into your controllers that pulls the EntityManager
from the ServiceManager.
For services, you could have them implement an EntityManagerAwareInterface
using an EntityManagerAwareTrait (that provides a setter,
Awesome!
Thanks everyone for your efforts!
Best,
Andreas
--
List: fw-general@lists.zend.com
Info: http://framework.zend.com/archives
Unsubscribe: fw-general-unsubscr...@lists.zend.com
Hello list,
I want to hash and verify password using Zend\Crypt, but I'm a bit irritated by
a discrepancy in the docs and the actual code:
Docs say:
use Zend\Crypt\Password\Bcrypt;
$bcrypt = new Bcrypt();
$securePass = 'the stored bcrypt value';
$password = 'the password to check';
if
Hello Ralf,
here you go:
snip
Thanks a lot!
Best regards,
Andreas
--
List: fw-general@lists.zend.com
Info: http://framework.zend.com/archives
Unsubscribe: fw-general-unsubscr...@lists.zend.com
Hello list,
with an application working well in a local development environment, I've
stumbled upon the following error in a production environment:
PHP Fatal error: spl_autoload(): Class Zend\\Db\\Sql\\Insert could not be
loaded in
Hello Ralf,
AbstractValidator::setDefaultTranslator($translator);
How are you attaching the listener? To what event? I don't seem to get it wired
up correctly yet.
Best regards,
Andreas
Hello Ralf,
currently I use this code in a ListenerAggregate class to add the
translations for validators:
$baseDir = APPLICATION_ROOT . '/module/Application/language';
$translator = Translator::factory(array(
'locale'= 'de',
Hello Ralf,
AbstractValidator::setDefaultTranslator($translator);
Sort of solved my problem by specifying the default translator in this way.
Don't like it, though.
Best regards,
Andreas
Hello Ralf,
I know its xmas but do you have any news on this. Just again I have the
problem with untranslated validator messages and I am starting again to
mess around with setting messages for each validator I use.
I haven't had much of a chance to work on this over the last two to three
Hello Ralf,
What do you say?
So, after having had a look at Zend\Validator\AbstractValidator, translation
obviously occurs in the validator, why setting form error messages in the form
*after* validation has occurred will leave form error messages untranslated.
Best regards,
Andreas
--
Hello list,
I'm wondering how form error messages are translated when using the
FormElementErrors view helper. It doesn't seem like the helper does any
translation. Do I need to specify already translated messages when assigning
them to the input filter used?
Best regards,
Andreas
--
List:
Hello list!
Has anyone bothered creating a MarkdownRenderer yet?
Best,
Andreas
--
List: fw-general@lists.zend.com
Info: http://framework.zend.com/archives
Unsubscribe: fw-general-unsubscr...@lists.zend.com
Hello Marco,
Not a renderer, but there's https://github.com/EvanDotPro/EdpMarkdown/ and
https://github.com/fwahlqvist/WdevMarkdown
Nice.
Maybe contribute to those? ;)
I definitely need more time to contribute, especially since I've learned to
like ZF2 a lot in the last weeks! Will not be
Hello Ralf,
thanks for your feedback!
I personally have now problems with that full stop. But there is another
issue which makes the messages translations useless currently.
https://github.com/zendframework/zf2/issues/2536
For example look at this file at the text for Alpha::NOT_ALPHA:
Hello Ralf,
Seems that the translation files need a big update, then, in the first
place. I'll have a look into this later.
Yep. Would be great if youn could sort that out. Anyway, why is the file
called Zend_Validate.php and not Zend_Validator.php?
Good question - I guess that's a
Hello list,
can anyone tell me what the reasonale is behind the fact that if I provide an
id attribute in a navigation page, that upon rendering using a navigation view
helper plugin, it is prepended with the normalised name of the view helper
plugin?
Best regards,
Andreas
--
List:
Hello Ralf,
Would it be possible to use the constants in the translation files
rather than the text messages? Instead of
Invalid type given. String, integer or float expected = ...
use
Zend\I18n\Validator\Alnum::INVALID = ...
So, when a text in the validator class is changed, then
Hello Ralf,
I like this idea. Andreas?
I wouldn't mind doing this, since I'm the one who opened the issue.
Unfortunately, I can't tell by when I could accomplish this. Matthew, can you
give me some deadline by which it should be finished to make it into 2.1?
Before new year, I guess, when I
Hello Matthew,
hello Frank,
Pretty sure Andreas is using ZF2…
I'm in fact using ZF2 and prepared the following gist
* https://gist.github.com/4259243
to demonstrate what I encountered.
Please note, though, that this is only an example - the actual menu has many
more items and I use the
Hello Matthew,
Yes -- the plan is to roll out 2.1 the first or second week of
January. As such, getting it in in the next two to three weeks would
be necessary if you want to hit that release.
I'll try my best!
Best regards,
Andreas
--
List: fw-general@lists.zend.com
Info:
Ah, I see - the issue is caused here:
*
https://github.com/zendframework/zf2/blob/master/library/Zend/View/Helper/Navigation/AbstractHelper.php#L839
I guess it's supposed to be a feature, then.
It's a feature, though, that will force me to
* override the standard navigation view helpers or
*
Hello Matthew,
I guess, though, that the simplest solution would be to extend all the
navigation view helper plugins and override the normalizeId() method that
reflects the functionality of Zend\View\Helper\AbstractHtmlElement. It's also a
solution that feels wrong, though.
Best regards,
Hello Frank,
with version 1.12 some new feature was added to Zend_Navigation. A port of
these new code to version 2 is missing.
Search for _normalizeId:
Hello list,
with version 1.12 some new feature was added to Zend_Navigation. A port of
these new code to version 2 is missing.
Search for _normalizeId:
Please do. :)
I will!
Just give me a bit of time, as I'll be attending the ZF2 online training this
and the next week, therefore I will be lacking spare time to take care of it.
Best regards,
Andreas
--
List: fw-general@lists.zend.com
Info: http://framework.zend.com/archives
Unsubscribe:
Hello Frank,
There are some more:
http://www.zfforum.de/faq-howto/9422-zend_navigation-1-12-setzen-eigener-html-attribute-fuer-seiten-z-b-azrelaoe.html
http://www.zfforum.de/faq-howto/9420-zend_navigation-1-12-setzen-des-id-attributes-fuer-ein-menue.html
Haven't read it, but it would be
Hello Frank,
http://www.zfforum.de/faq-howto/9422-zend_navigation-1-12-setzen-eigener-html-attribute-fuer-seiten-z-b-azrelaoe.html
This makes a lot of sense to support in ZF2 as well! Will take care of it.
Best regards,
Andreas
Hello Frank,
Kyle Spraggs (spiffyjr) is working on a new version:
https://github.com/spiffyjr/spiffy-navigation
I will write him an e-mail, because I think we need a RFC for a new
navigation component and helpers!
Awesome, we shouldn't waste any buttons having been pushed already.
Best
Hello everyone,
I have added a bunch of full stops at the end of validation messages provided
by ZF2.
* https://github.com/zendframework/zf2/pull/2984
Matthew and folks on IRC #zftalk pointed out that it might be an issue for
those that are using the actual strings as message ids for their
Hello Will,
I've been trying to figure out how to do DB sessions for quite some time now
by using built in ZF2 functionality. However no one I have talked seems to
have any idea on how to do this. The other option that I have is to build
my own save-handler which works just fine however I
Thank you very much.
Another question: how validators messages can be translated?
Are you asking how you can make PoEdit pick message strings up? You could use
the __() function whenever you set a validation message, too.
Best regards,
Andreas
--
List: fw-general@lists.zend.com
Info:
Hello list,
I just wondered what you guys would consider as best practice if you had, for
example, a bunch of more or less static views and had to provide translate
functionality. Some of these views can be very - let's say - special, as they
contain lots of markup and dissecting them and
I created a
function __($string) {
return $string;
}
that I placed in /public/index.php.
That should help!
Best regards,
Andreas
--
List: fw-general@lists.zend.com
Info: http://framework.zend.com/archives
Unsubscribe: fw-general-unsubscr...@lists.zend.com
Hello Gerard,
I guess the github issue tracker will probably works best for this kind of
thing. Not ideal, but close.
* You can keep the dicussion part of the issue closed and then open it at the
appropriate time.
* You can watch an issue in github, so that kinda notifies you when it
Hello Matt,
It can definitely be confusing if you're frequently switching between role
of the analyst and developer, but I've personally found it to make things
much clearer for me in the long run.
(just my 2¢)
Indeed, it is quite confusing. Even more if one is trying to understand the
Hello Gerard,
In zf2, most Manager classes such as `Zend\ServiceManager\ServiceManager`,
`Zend\EventManager\EventManager`, `Zend\Mvc\Controller\PluginManager` are
assigned to variable names like `$services`, `$events`, `$plugins`.
I feel these instances should be named after what they
Hello Matthew,
I have forgotten to do so, but have amended the view script. In the form,
though, still the unfiltered value is rendered.
Thanks for providing feedback at the gist at
* https://gist.github.com/2ac6f7be6aa0a5575845
The problem I see with this, though, is that - users will now
Hello Matthew,
I understand what you're getting at -- as I mentioned in my comment on
the gist, that's how I originally coded it. However, the feedback I
received then (after the initial release in beta4) was that this
situation was more confusing to end users.
I can definitely see both
I agree with some of his points. You haven't heard me complain because I've
stopped caring about these kind of things. I don't advocate changing these
things at this stage either. zf3 is the place for that.
For issues like the one discussed here, shall an issue be created on Github?
Best
Hello Matthew,
The only problem is that the methods available will vary based on what
plugins/helpers are registered in the system. Since this can be dynamic,
I wonder if incomplete @method annotations would be worse than none at
all…
Agreed.
Best regards,
Andreas
--
List:
Hello Gerry,
That's an interesting approach. I'm not sure. Discussions on issues like this
can go on for ever. I think it will be better to disable the discussion in
the issue tracker and just link to relating resources instead.
From what, though?
Add tags review-for-zf3, tbd-zf3 or
Hello list,
I'm not so sure if I understood this right or whether it only has changed from
ZF1 to ZF2:
* A form has been injected an input filter with filters and validators.
* The form is not valid for all fields.
Shouldn't the form - upon rendering - show the already filtered values?
It
Hello Gerry,
That's an interesting approach. I'm not sure. Discussions on issues like
this can go on for ever. I think it will be better to disable the
discussion in the issue tracker and just link to relating resources
instead.
From what, though?
???
How do you mean
Hello Matthew,
Can you show the code you're using?
Sure, thanks for getting back to me:
* https://gist.github.com/2ac6f7be6aa0a5575845
Rendering the filtered values is definitely part of the various form
helpers, and was a primary use case when we developed it -- which makes
me wonder
Hello Matthew,
Hmmm... looking at the example, usage is per the documented use cases;
in other words, it should be populating the form.
The form is populated, but not with the filtered values.
Are you calling $form-prepare() in your view script? If not, add
that…
I have forgotten to do
To be honest, the idea of writing a bug report for documentation feels weird,
but I think that's really the best way for us who don't know the ins and outs
of the components to be able to contribute. The more constructive the bug
report, the better, but even a Documentation for Json sucks
Hello list,
may I ask why instances of EventManager are referred to as events, rather than
eventManager?
Best regards,
Andreas
--
List: fw-general@lists.zend.com
Info: http://framework.zend.com/archives
Unsubscribe: fw-general-unsubscr...@lists.zend.com
Hello Artur,
Reference please.
Search for
* $events
* protected $events
in clones of
* git://github.com/zendframework/zf2-documentation.git
* git://github.com/zendframework/zf2.git
In general, events is just a shorthand. It is used througout communication
to reference either EM, Event
Indeed! I've mentioned it on list before, and in the rtfm.org version of
the docs, there's a popup with details; additionally, even on the main
website, you'll see an edit link in the sidebar for each page. This
makes it tremendously easy to submit quick fixes for any given page --
so,
Hello Artur,
So in this case, it's a shorthand based on the objective (as opposed to a
shorhand based purely on full name).
I.e.
$this-events-trigger()
$this-events-attach()
$this-events-detach()
It's just like saying trigger some events (which of course is not 100%
accurate, but
Hello list,
Not so sure about this, but couldn't developers benefit from usage of @method
tags, for example in Zend\Mvc\Controller\AbstractActionController. Here, for
non-existent methods, __call() attempts to pull a controller plugin from the
plugin manager and tries to invoke it with the
Hello Matthew,
I got confused -- I meant to say zf2.rtfd.org, which redirects to what
you linked. (I'm used to the acronym rtfm, and forgot that they use rtfd
instead!)
No worries, I imagine it's quite difficult oftentimes with all these issues to
keep up with.
Best regards,
Andreas
--
Hello Matthew,
If you're talking about the _protected_ property, or the fact that many
setEventManager() implementations use $events as the name of the
EventManager property, or even that many examples will use constructs
like $events = $object-getEventManager(); it's simply because:
a)
Hello Matthew,
It aggregates listeners and triggers events; it could have been named
either way, to be honest. EventManager is cumbersome as a variable
name, but perfectly fine as a class name.
I bet there are variables with names that are much longer eventManager. With
auto-completion,
We often abbreviate ServiceManager to $services (or, in the case of
plugin managers, $helpers, $plugins, $controllers). If we were to
make the change for the event manager, I'd expect we'd have to rename
them everywhere.
That would make sense, yes.
This is a pretty substantial refactor
Hello Marc,
I know your feelings, I feel the same way sometimes. I´m looking at the docu
and the thing I want to look up is not described in detail. Now I have
only two options, go ask here or in IRC. It is enough for me, because
I see that in the channels and here are enough people to
Hello Stoyan,
Thank you very much for your answer! :)
It is very valuable for me! It reveals the decision making process for ZF.
Another words, there is no central point where a person can go read and follow
the evolution of the process.
While trying to understand ZF2, I have started
The messages themselves can be anything that can be serialized. I tend to use
$message = array('type'='error', 'message'='blah');
Thanks for the hint!
As far as I can tell from looking at the code of \Zend\Stdlib\SplQueue that is
used for storing messages, that's true. I hadn't looked at it
Hello again,
after having read some stuff on Matthew's blog, I find there's actually a bunch
of stuff that he has written about in the last four years that has made it into
ZF1.
For example, the idea to attach forms (in the sense of a container for filters
and validators) to models - which
Hello Robert,
Some of my following words might be interpreted that I'm standing on Zend The
Company's side, but that's not the case.
No worries, I guess most people on this mailing list know that.
Zend The Company is allocating a lot of money as it is. AFAIK, they have 3
people working
Hello Bart,
This may look like shameless self-promotion, but I want to add this since
much of what Robert says is how I experienced it too:
I wrote a large article in the September issue of php|architect
(www.phparch.com) about 'migrating' a ZF 1 application to ZF 2. You can learn
the
Hello list,
may I ask why the FlashMessenger plugin does not support specifying the type of
the message that has been added?
Best regards,
Andreas
--
List: fw-general@lists.zend.com
Info: http://framework.zend.com/archives
Unsubscribe: fw-general-unsubscr...@lists.zend.com
Hello,
may I ask: is this
* http://shop.zend.com/en/zend-framework-fundamentals-2.html
the reason why the documentation for ZF2 is of the quality you can find at
* http://framework.zend.com/manual/2.0/en/index.html
. . . ?
In the time and with the money taken for these online classes, I
Hello Robert,
I don't understand what are you getting at?
What I am getting at is that I find the quality of the ZF2 documentation quite
low and wonder whether it is this low in quality because Zend rather wants
people to spend 1.200€ on a course that covers the basics of building
Zend_Log has this in the Log() function;
// pack into event required by filters and writers
$event = array_merge(array('timestamp'= date('c'),
'message' = $message,
'priority' = $priority,
I'm looking at:
http://framework.zend.com/manual/1.12/en/zend.currency.additional.html#zend.currency.additional.cache
Where does this code go? After I create a currency object in my controller?
You could assign a cache instance during bootstrapping, that is, in an
initialization method in
Hmm. Nothing? Is there a better way to do this then?
You could take a look at Yaml and use the Symfony Yaml parser for
loading configuration files.
I've used it in recent ZF1 projects as Zend_Config_Yaml doesn't work
with keys that contain backspaces and it works well.
As far as I know,
fields[0][name]
fields[0][description]
fields[0][required]
I've observed circumstances where this was achieved using subforms.
There, the purpose was to synchronise the submitted post data with
Doctrine records.
I felt it was overkill, but it serves its purpose.
Best regards,
Andreas
--
This http://i.imgur.com/ijyf5.png sums up pretty well why I gave up on
SO. The mailing list/IRC at least filters out, to some extent, that
kind of people.
Priceless!
--
List: fw-general@lists.zend.com
Info: http://framework.zend.com/archives
Unsubscribe: fw-general-unsubscr...@lists.zend.com
This http://i.imgur.com/ijyf5.png sums up pretty well why I gave up on
SO. The mailing list/IRC at least filters out, to some extent, that
kind of people.
Why so negative ? :-)
I fully understand this: either you want to help OR you want to gain
reputation.
Hello list,
With a current project I've just come across the following issue:
* started changing the application configuration file format from ini to
yaml, as I thought it's better readable
* original ini application configuration file contains options for
Zend_Loader_PluginLoader, e.g.
Try enclosing the key in double quotes:
Bisna\Application\Resource\: BASE_PATH/library/Bisna/Application/Resource
I'm not sure if that will work or not, but it's worth a try.
Thanks a lot for your reply, Matthew.
Just tried it out, but doesn't work.
Also, the YAML parser we have
I have a controller plugin with a preDispatch() method. It calls two very
basic methods and both of them can throw an exception. Right now they are
both throwing an instance of Exception. The problem is that when one of them
throws an exception it gets caught and added to the response
On Feb 17, 2012, at 6:51 AM, Jakub Vrana wrote:
snip
Padraic Brady: Don't forget the forward slash in your escaping... I hear it's
used to terminate element tags. I could be wrong - I never did get around to
reading the HTML 4.01 spec they released last year.
Priceless!
Andreas
--
List:
TBH, I'd build a custom validator for this. The date validator as it
currently stands checks to ensure the provided date is valid -- and as
such needs the full date. What you're describing is a very specific
strategy that allows for multiple specifications, dependent on locale.
Exactly.
Hello list,
I've got an application where dates need to be validated, but the
exactness of the dates varies.
Sometimes
* only year (4 digits)
* only year (4 digits) and month (2 digits)
* only year (4 digits), month (2 digits) and day of month (2 digits)
* etc
is required.
Is it possible to
You could also do the following:
1. Store your map of host names and environments in an .ini file (e.g.
/application/configs/environment.ini) or the like (yml, Php array), e.g.
[environment]
production[] = example.com
testing[] = testing.example.com
staging[] = staging.example.com
Special note: this Poll closes today in 1 hour.
Too sad to see prefixing of Abstract lose to suffixing, which is what is
suggested for PEAR2 coding standards:
http://pear.php.net/manual/en/pear2cs.php
Regards,
Andreas
--
List: fw-general@lists.zend.com
Info:
I think in the Interface in FooInterface should be referred to interface
declaration while Abstract in FooAbstract referred to abstract
declaration, which makes it more meaningful and consistent both in naming
convention and in English
+1 (This is what I voted, too).
Apart from this, when
Regardless other arguments, I do think it a valid advantage for grouping
files to use suffix for all, including Interface, Abstract and future Trait.
Hope Ralph can take this into account.
Using suffixes also takes into account the naming style in ZF1 with PHP 5.3:
Foo_Bar_Baz_Abstract
Using suffixes also takes into account the naming style in ZF1 with PHP
5.3:
Foo_Bar_Baz_Abstract
Foo_Bar_Baz_Interface
I think this is a red herring. The above doesn't map the same at all, as
in ZF1 we were able to group them in a directory together:
Foo/
Bar/
I really don't follow the grouping argument - not all Abstracts,
Interfaces and Traits would share the same Noun. I could have an
AbstractHtmlSanitiser implementing a FilterInterface making use of
several HtmlMarkupTraits. Actually that whole last sentence just shows
why English ordered
Perhaps for you, for me it looks and sounds awkward ;).
Similar to suffixing in one place and prefixing in another.
Andreas
--
List: fw-general@lists.zend.com
Info: http://framework.zend.com/archives
Unsubscribe: fw-general-unsubscr...@lists.zend.com
I'd argue that's unreadable. :)
I understand the consistency argument, but I also am a proponent of
natural language constructs in programming, as I feel they make code
easier to read and understand. I'm okay with a little inconsistency if
it enables readability.
But does it?
You may have
There you've got proof that using a noun as an adjective is not
unnatural at all:
http://www.englishclub.com/grammar/nouns-adjective.htm
Andreas
--
List: fw-general@lists.zend.com
Info: http://framework.zend.com/archives
Unsubscribe: fw-general-unsubscr...@lists.zend.com
Something like that would work yes. During route startup you get the
router, all the routes and inject them. The router will find a match with a
pool including these routes.
If you're retrieving all the routes at once, you can probably just as well skip
the idea with the plugin and create a
1 - 100 of 120 matches
Mail list logo