Re: [fw-general] Zend_Auth storing special characters

2010-09-16 Thread Bradley Holt
Keith,

On Wed, Sep 15, 2010 at 10:47 AM, keith Pope wrote:

> Hi,
>
> Has anyone ever had any problems with Zend_Auth failing to
> store/serialize data that has ü etc in.
>
> I seem to be losing the auth session for all users with names
> containing utf-8 chars
>
>
Are you using a PDO database adapter?  Do you have the charset parameter for
your database connection set to "UTF8"?


> Thx
>
> Keith
>


Re: [fw-general] Feeds

2010-05-27 Thread Bradley Holt
On Thu, May 27, 2010 at 7:42 PM, Daniel Latter  wrote:

> Hi all,
>
> I'm processing feeds with Zend_Feed and I am wondering how to get instant
> feed updates like Google reader?
>
> For example, I consume a feed from bbc.co.uk and get a pubDate for each
> item, but if I look in Google reader at same feed I can see that it has
> been/gets updated almost instantly with new items? But the propoagtion to
> the feed takes much longer?
>
> Now I know about the pubsubhubbub class that ZF provides that enables "real
> time web" but that is still relatively new.
>
>
Why is its "newness" a reason not to use it?


> So I guess my question is how can I architect real time feed updates like
> Google Reader.?
>
>
I'd just use PubSubHubbub and not reinvent the wheel :-)


> Thanks
> Dan


Re: [fw-general] Quick help with routes

2010-05-24 Thread Bradley Holt
On Mon, May 24, 2010 at 3:58 PM, Саша Стаменковић wrote:

> Ok, but I neeed that dash search/price/100-200/...
>
>
Why does it have to be a dash? Why can't you use a forward slash? If it must
be a dash then you have a couple of options. One is to parse the parameter
manually in your controller by removing the dash and pulling out the two
values. The other option is to write your own router that understand dashes,
not just forward slashes, as a separator of keys and/or values. Zend
Framework's routing functionality as-is will not be able to understand the
dashes as being anything other than part of your data.


> Regards,
> Saša Stamenković
>
>
>
> On Mon, May 24, 2010 at 9:55 PM, Bradley Holt 
> wrote:
>
>> On Mon, May 24, 2010 at 3:50 PM, Саша Стаменковић wrote:
>>
>>> Thanks Bradley.
>>>
>>> yes, thats the default routing. It accepts
>>> /search/price/0/price/10/year/1960/year/2010/city/0/sort_by/0/mode/1 and
>>> then price is an arrray in request. I want that behaviour, but just with a
>>> bit prettyer url /search/price/0-10/year/1960-2010...
>>>
>>>
>> Try this, then:
>>
>>
>> search/price/100/200/year/1947/2010/city/Nis/sort_by/sth/mode/1
>>
>>
>> search/price/:price_min/:price_max/year/:year_min/:year_max/city/:city/sort_by/:sort_by/mode/:mode
>>
>>
>>> Regards,
>>> Saša Stamenković
>>>
>>>
>>>
>>> On Mon, May 24, 2010 at 9:46 PM, Bradley Holt <
>>> bradley.h...@foundline.com> wrote:
>>>
>>>> On Mon, May 24, 2010 at 3:39 PM, Саша Стаменковић 
>>>> wrote:
>>>>
>>>>> I need route like this
>>>>>
>>>>> search/price/100-200/year/1947-2010/city/Nis/sort_by/sth/mode/1
>>>>>
>>>>> search/price/:price-:price/year/:year-:year/city/:city/sort_by/:sort_by/mode/:mode
>>>>>
>>>>> This end up with uncaught exception 'Zend_Controller_Router_Exception'
>>>>> with message 'price-:price is not specified'.
>>>>>
>>>>> Can I achieve that this range 100-200 be in request like array(100,
>>>>> 200), if not, I'll be satisfied with "100-200".
>>>>>
>>>>> Can someone suggest best practices for building such routes?
>>>>>
>>>>
>>>> I'm pretty sure you can only have one parameter per URL segment. Your
>>>> ":price-:price" and ":year-:year" segments are trying to cram two 
>>>> parameters
>>>> into one segment. Try the following instead:
>>>>
>>>>
>>>> search/price-min/100/price-max/200/year-min/1947/year-max/2010/city/Nis/sort_by/sth/mode/1
>>>>
>>>> search/price-min/:price_min/price-max/:price_max/year-min/:year_min/year-max/:year_max/city/:city/sort_by/:sort_by/mode/:mode
>>>>
>>>> Actually, if you do that then you don't need to explicitly define your
>>>> route at all since you're simply using key/value pair.
>>>>
>>>>
>>>>>
>>>>> Regards,
>>>>> Saša Stamenković
>>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>
>>
>>
>>
>


Re: [fw-general] Quick help with routes

2010-05-24 Thread Bradley Holt
On Mon, May 24, 2010 at 3:50 PM, Саша Стаменковић wrote:

> Thanks Bradley.
>
> yes, thats the default routing. It accepts
> /search/price/0/price/10/year/1960/year/2010/city/0/sort_by/0/mode/1 and
> then price is an arrray in request. I want that behaviour, but just with a
> bit prettyer url /search/price/0-10/year/1960-2010...
>
>
Try this, then:

search/price/100/200/year/1947/2010/city/Nis/sort_by/sth/mode/1

search/price/:price_min/:price_max/year/:year_min/:year_max/city/:city/sort_by/:sort_by/mode/:mode


> Regards,
> Saša Stamenković
>
>
>
> On Mon, May 24, 2010 at 9:46 PM, Bradley Holt 
> wrote:
>
>> On Mon, May 24, 2010 at 3:39 PM, Саша Стаменковић wrote:
>>
>>> I need route like this
>>>
>>> search/price/100-200/year/1947-2010/city/Nis/sort_by/sth/mode/1
>>>
>>> search/price/:price-:price/year/:year-:year/city/:city/sort_by/:sort_by/mode/:mode
>>>
>>> This end up with uncaught exception 'Zend_Controller_Router_Exception'
>>> with message 'price-:price is not specified'.
>>>
>>> Can I achieve that this range 100-200 be in request like array(100, 200),
>>> if not, I'll be satisfied with "100-200".
>>>
>>> Can someone suggest best practices for building such routes?
>>>
>>
>> I'm pretty sure you can only have one parameter per URL segment. Your
>> ":price-:price" and ":year-:year" segments are trying to cram two parameters
>> into one segment. Try the following instead:
>>
>>
>> search/price-min/100/price-max/200/year-min/1947/year-max/2010/city/Nis/sort_by/sth/mode/1
>>
>> search/price-min/:price_min/price-max/:price_max/year-min/:year_min/year-max/:year_max/city/:city/sort_by/:sort_by/mode/:mode
>>
>> Actually, if you do that then you don't need to explicitly define your
>> route at all since you're simply using key/value pair.
>>
>>
>>>
>>> Regards,
>>> Saša Stamenković
>>>
>>
>>
>>
>>
>>
>


Re: [fw-general] Quick help with routes

2010-05-24 Thread Bradley Holt
On Mon, May 24, 2010 at 3:39 PM, Саша Стаменковић wrote:

> I need route like this
>
> search/price/100-200/year/1947-2010/city/Nis/sort_by/sth/mode/1
>
> search/price/:price-:price/year/:year-:year/city/:city/sort_by/:sort_by/mode/:mode
>
> This end up with uncaught exception 'Zend_Controller_Router_Exception'
> with message 'price-:price is not specified'.
>
> Can I achieve that this range 100-200 be in request like array(100, 200),
> if not, I'll be satisfied with "100-200".
>
> Can someone suggest best practices for building such routes?
>

I'm pretty sure you can only have one parameter per URL segment. Your
":price-:price" and ":year-:year" segments are trying to cram two parameters
into one segment. Try the following instead:

search/price-min/100/price-max/200/year-min/1947/year-max/2010/city/Nis/sort_by/sth/mode/1
search/price-min/:price_min/price-max/:price_max/year-min/:year_min/year-max/:year_max/city/:city/sort_by/:sort_by/mode/:mode

Actually, if you do that then you don't need to explicitly define your route
at all since you're simply using key/value pair.


>
> Regards,
> Saša Stamenković
>


Re: [fw-general] Zend_Validate_CreditCard and Authorize.Net's Sandbox API

2010-04-28 Thread Bradley Holt
On Wed, Apr 28, 2010 at 5:41 PM, Rob Riggen  wrote:

> DISCLAIMER: my advice is not necessarily relevant to
> Zend_Validate_CrediCard.
>
> There's a universal test CC num of  - not sure if that is
> going to work in your case but technically that should validate...
>
> I think it is a visa, though...
>

Thanks, Rob! That "universal" test credit card number seemed to make both
Zend_Validate_CreditCard and Authorize.Net's sandbox API happy. I hope it
wasn't your credit card number ;-)


>
> Rob
>
>
> On Wed, Apr 28, 2010 at 5:29 PM, Bradley Holt 
> wrote:
>
>> Has anyone else tried to use Zend_Validate_CreditCard with Authorize.Net's
>> sandbox API? I've run into a problem that is making it difficult for me to
>> test my application. The test credit card number that Authorize.Net provides
>> for their sandbox API (4) is not a valid credit card number--at
>> least according to Zend_Validate_CreditCard. It appears that
>> Zend_Validate_CreditCard thinks this is a Visa credit card (since it starts
>> with a '4') and that Visa credit cards should have a length of 16 characters
>> but Authorize.Net's test credit card has a length of 13 characters, causing
>> it to fail validation. Has anyone either found other, valid, test credit
>> numbers that work in Authorize.Net's sandbox API or found a simple way to
>> get Zend_Validate_CreditCard to accept this as a valid credit card (at least
>> in testing)?
>>
>> --
>> Bradley Holt
>> bradley.h...@foundline.com
>>
>>
>


-- 
Bradley Holt
bradley.h...@foundline.com


[fw-general] Zend_Validate_CreditCard and Authorize.Net's Sandbox API

2010-04-28 Thread Bradley Holt
Has anyone else tried to use Zend_Validate_CreditCard with Authorize.Net's
sandbox API? I've run into a problem that is making it difficult for me to
test my application. The test credit card number that Authorize.Net provides
for their sandbox API (4) is not a valid credit card number--at
least according to Zend_Validate_CreditCard. It appears that
Zend_Validate_CreditCard thinks this is a Visa credit card (since it starts
with a '4') and that Visa credit cards should have a length of 16 characters
but Authorize.Net's test credit card has a length of 13 characters, causing
it to fail validation. Has anyone either found other, valid, test credit
numbers that work in Authorize.Net's sandbox API or found a simple way to
get Zend_Validate_CreditCard to accept this as a valid credit card (at least
in testing)?

-- 
Bradley Holt
bradley.h...@foundline.com


[fw-general] Assert Input Value in Zend_Test_PHPUnit_ControllerTestCase

2010-01-15 Thread Bradley Holt
I have a test in a Zend_Test_PHPUnit_ControllerTestCase in which I
want to assert the value of an input field using CSS selectors. I did
some web searching and digging through the manual but couldn't come up
with anything that worked (apologies if this has already been answered
and I didn't find it). Here's an example input element:

  

Here are a couple of assertions I tried passing to the assertQuery
method, each of which failed:

  input[name="foo"][value="bar"]
  input[name="foo",value="bar"]

Has anyone gotten this type of assertion to work? If I assert the name
or the value separately, each assertion passes on its own (but it's
the combination I want to test):

  input[name="foo"]
  input[value="bar"]

Thanks,
Bradley

-- 
Bradley Holt
bradley.h...@foundline.com


Re: [fw-general] Has anyone ported ZF project from Windows to Linux before?

2009-11-29 Thread Bradley Holt
Can you look at your web server logs and see what the error is? If
it's giving a 500 error, it should be logged.

On Sun, Nov 29, 2009 at 4:52 PM, Jigal sanders  wrote:
> sorry the nrka/pulic is my docroot
> i created this project on windows  using zend tool
>
> On Sun, Nov 29, 2009 at 10:50 PM, Bradley Holt 
> wrote:
>>
>> Those should not all be in your document root -- "public" should
>> become your document root (or renamed to match your document root if
>> you prefer) and all the other directories (application, library, etc.)
>> should all be at the same level as your document root. See:
>>
>> http://framework.zend.com/manual/en/project-structure.project.html
>>
>> On Sun, Nov 29, 2009 at 4:43 PM, Jigal sanders 
>> wrote:
>> > it doesn't work.
>> > i have in my docroot:
>> > nrka/
>> > application
>> > library
>> > public
>> > tests
>> >
>> >
>> > On Sun, Nov 29, 2009 at 10:40 PM, Bradley Holt
>> > 
>> > wrote:
>> >>
>> >> OK, that's a step in the right direction then :-)
>> >>
>> >> Try adding this line right after RewriteEngine On (assuming your ZF
>> >> application isn't in a subdirectory of your document root):
>> >>
>> >> RewriteBase /
>> >>
>> >> On Sun, Nov 29, 2009 at 4:37 PM, Jigal sanders 
>> >> wrote:
>> >> > yes i have restarted.
>> >> > now i get a apache 500
>> >> >
>> >> > On Sun, Nov 29, 2009 at 10:36 PM, Bradley Holt
>> >> > 
>> >> > wrote:
>> >> >>
>> >> >> Have you restarted Apache since changing your virtual host
>> >> >> configuration? Are you still getting a 404 or a different error now?
>> >> >>
>> >> >> On Sun, Nov 29, 2009 at 4:34 PM, Jigal sanders
>> >> >> 
>> >> >> wrote:
>> >> >> > this is what i have in my .htaccess file on the public directory
>> >> >> >
>> >> >> > SetEnv APPLICATION_ENV development
>> >> >> >
>> >> >> > RewriteEngine On
>> >> >> > RewriteCond %{REQUEST_FILENAME} -s [OR]
>> >> >> > RewriteCond %{REQUEST_FILENAME} -l [OR]
>> >> >> > RewriteCond %{REQUEST_FILENAME} -d
>> >> >> > RewriteRule ^.*$ - [NC,L]
>> >> >> > RewriteRule ^.*$ index.php [NC,L]
>> >> >> >
>> >> >> > On Sun, Nov 29, 2009 at 10:32 PM, Bradley Holt
>> >> >> > 
>> >> >> > wrote:
>> >> >> >>
>> >> >> >> What do your rewrite rules look like?
>> >> >> >>
>> >> >> >> On Sun, Nov 29, 2009 at 4:29 PM, Jigal sanders
>> >> >> >> 
>> >> >> >> wrote:
>> >> >> >> > No I have this:
>> >> >> >> >
>> >> >> >> > 
>> >> >> >> >     ServerAdmin jigalroe...@gmail.com
>> >> >> >> >
>> >> >> >> >     DocumentRoot /var/www/nrka/public/
>> >> >> >> >     ServerName nrka
>> >> >> >> >     
>> >> >> >> >         Options Indexes FollowSymLinks MultiViews
>> >> >> >> >         AllowOverride All
>> >> >> >> >         Order allow,deny
>> >> >> >> >         allow from all
>> >> >> >> >     
>> >> >> >> >     ##ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
>> >> >> >> >     ##
>> >> >> >> >     ##    AllowOverride None
>> >> >> >> >     ##    Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
>> >> >> >> >     ##    Order allow,deny
>> >> >> >> >     ##    Allow from all
>> >> >> >> >     ##
>> >> >> >> >
>> >> >> >> >     ErrorLog /var/log/apache2/error.log
>> >> >> >> >
>> >> >> >> >     # Possible values include: debug, info, notice, warn,
>> >> >> >> > error,
>> >> >> >> > crit,
>> >> >> >> >     #

Re: [fw-general] Has anyone ported ZF project from Windows to Linux before?

2009-11-29 Thread Bradley Holt
Those should not all be in your document root -- "public" should
become your document root (or renamed to match your document root if
you prefer) and all the other directories (application, library, etc.)
should all be at the same level as your document root. See:

http://framework.zend.com/manual/en/project-structure.project.html

On Sun, Nov 29, 2009 at 4:43 PM, Jigal sanders  wrote:
> it doesn't work.
> i have in my docroot:
> nrka/
> application
> library
> public
> tests
>
>
> On Sun, Nov 29, 2009 at 10:40 PM, Bradley Holt 
> wrote:
>>
>> OK, that's a step in the right direction then :-)
>>
>> Try adding this line right after RewriteEngine On (assuming your ZF
>> application isn't in a subdirectory of your document root):
>>
>> RewriteBase /
>>
>> On Sun, Nov 29, 2009 at 4:37 PM, Jigal sanders 
>> wrote:
>> > yes i have restarted.
>> > now i get a apache 500
>> >
>> > On Sun, Nov 29, 2009 at 10:36 PM, Bradley Holt
>> > 
>> > wrote:
>> >>
>> >> Have you restarted Apache since changing your virtual host
>> >> configuration? Are you still getting a 404 or a different error now?
>> >>
>> >> On Sun, Nov 29, 2009 at 4:34 PM, Jigal sanders 
>> >> wrote:
>> >> > this is what i have in my .htaccess file on the public directory
>> >> >
>> >> > SetEnv APPLICATION_ENV development
>> >> >
>> >> > RewriteEngine On
>> >> > RewriteCond %{REQUEST_FILENAME} -s [OR]
>> >> > RewriteCond %{REQUEST_FILENAME} -l [OR]
>> >> > RewriteCond %{REQUEST_FILENAME} -d
>> >> > RewriteRule ^.*$ - [NC,L]
>> >> > RewriteRule ^.*$ index.php [NC,L]
>> >> >
>> >> > On Sun, Nov 29, 2009 at 10:32 PM, Bradley Holt
>> >> > 
>> >> > wrote:
>> >> >>
>> >> >> What do your rewrite rules look like?
>> >> >>
>> >> >> On Sun, Nov 29, 2009 at 4:29 PM, Jigal sanders
>> >> >> 
>> >> >> wrote:
>> >> >> > No I have this:
>> >> >> >
>> >> >> > 
>> >> >> >     ServerAdmin jigalroe...@gmail.com
>> >> >> >
>> >> >> >     DocumentRoot /var/www/nrka/public/
>> >> >> >     ServerName nrka
>> >> >> >     
>> >> >> >         Options Indexes FollowSymLinks MultiViews
>> >> >> >         AllowOverride All
>> >> >> >         Order allow,deny
>> >> >> >         allow from all
>> >> >> >     
>> >> >> >     ##ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
>> >> >> >     ##
>> >> >> >     ##    AllowOverride None
>> >> >> >     ##    Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
>> >> >> >     ##    Order allow,deny
>> >> >> >     ##    Allow from all
>> >> >> >     ##
>> >> >> >
>> >> >> >     ErrorLog /var/log/apache2/error.log
>> >> >> >
>> >> >> >     # Possible values include: debug, info, notice, warn, error,
>> >> >> > crit,
>> >> >> >     # alert, emerg.
>> >> >> >     LogLevel warn
>> >> >> >
>> >> >> >     CustomLog /var/log/apache2/access.log combined
>> >> >> >
>> >> >> >     Alias /doc/ "/usr/share/doc/"
>> >> >> >     
>> >> >> >     Options Indexes MultiViews FollowSymLinks
>> >> >> >     AllowOverride All
>> >> >> >     Order deny,allow
>> >> >> >     Deny from all
>> >> >> >     Allow from 127.0.0.0/255.0.0.0 ::1/128
>> >> >> >     
>> >> >> >
>> >> >> > 
>> >> >> >
>> >> >> > but it still doesn't work. I have the idea that there is too much
>> >> >> > in
>> >> >> > this
>> >> >> > file.
>> >> >> >
>> >> >> > On Sun, Nov 29, 2009 at 10:25 PM, Sudheer Satyanarayana
>> >> >> >  wrote:
>> >> >> >>
>> >> >> >> On Monday 30 November 2009

Re: [fw-general] Has anyone ported ZF project from Windows to Linux before?

2009-11-29 Thread Bradley Holt
OK, that's a step in the right direction then :-)

Try adding this line right after RewriteEngine On (assuming your ZF
application isn't in a subdirectory of your document root):

RewriteBase /

On Sun, Nov 29, 2009 at 4:37 PM, Jigal sanders  wrote:
> yes i have restarted.
> now i get a apache 500
>
> On Sun, Nov 29, 2009 at 10:36 PM, Bradley Holt 
> wrote:
>>
>> Have you restarted Apache since changing your virtual host
>> configuration? Are you still getting a 404 or a different error now?
>>
>> On Sun, Nov 29, 2009 at 4:34 PM, Jigal sanders 
>> wrote:
>> > this is what i have in my .htaccess file on the public directory
>> >
>> > SetEnv APPLICATION_ENV development
>> >
>> > RewriteEngine On
>> > RewriteCond %{REQUEST_FILENAME} -s [OR]
>> > RewriteCond %{REQUEST_FILENAME} -l [OR]
>> > RewriteCond %{REQUEST_FILENAME} -d
>> > RewriteRule ^.*$ - [NC,L]
>> > RewriteRule ^.*$ index.php [NC,L]
>> >
>> > On Sun, Nov 29, 2009 at 10:32 PM, Bradley Holt
>> > 
>> > wrote:
>> >>
>> >> What do your rewrite rules look like?
>> >>
>> >> On Sun, Nov 29, 2009 at 4:29 PM, Jigal sanders 
>> >> wrote:
>> >> > No I have this:
>> >> >
>> >> > 
>> >> >     ServerAdmin jigalroe...@gmail.com
>> >> >
>> >> >     DocumentRoot /var/www/nrka/public/
>> >> >     ServerName nrka
>> >> >     
>> >> >         Options Indexes FollowSymLinks MultiViews
>> >> >         AllowOverride All
>> >> >         Order allow,deny
>> >> >         allow from all
>> >> >     
>> >> >     ##ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
>> >> >     ##
>> >> >     ##    AllowOverride None
>> >> >     ##    Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
>> >> >     ##    Order allow,deny
>> >> >     ##    Allow from all
>> >> >     ##
>> >> >
>> >> >     ErrorLog /var/log/apache2/error.log
>> >> >
>> >> >     # Possible values include: debug, info, notice, warn, error,
>> >> > crit,
>> >> >     # alert, emerg.
>> >> >     LogLevel warn
>> >> >
>> >> >     CustomLog /var/log/apache2/access.log combined
>> >> >
>> >> >     Alias /doc/ "/usr/share/doc/"
>> >> >     
>> >> >     Options Indexes MultiViews FollowSymLinks
>> >> >     AllowOverride All
>> >> >     Order deny,allow
>> >> >     Deny from all
>> >> >     Allow from 127.0.0.0/255.0.0.0 ::1/128
>> >> >     
>> >> >
>> >> > 
>> >> >
>> >> > but it still doesn't work. I have the idea that there is too much in
>> >> > this
>> >> > file.
>> >> >
>> >> > On Sun, Nov 29, 2009 at 10:25 PM, Sudheer Satyanarayana
>> >> >  wrote:
>> >> >>
>> >> >> On Monday 30 November 2009 02:40 AM, Jigal sanders wrote:
>> >> >>>
>> >> >>> Well,
>> >> >>>
>> >> >>> my first problem is that it gets to my webroot but when I click on
>> >> >>> a
>> >> >>> link, it doesn't follow my controller and action. I rather get an
>> >> >>> error:
>> >> >>>
>> >> >>> The requested URL /authentication/login was not found on this
>> >> >>> server.
>> >> >>>
>> >> >>> the whole structure is exactly coppied to my project on ubuntu.
>> >> >>>
>> >> >>> can it be something in my vhost config?
>> >> >>>
>> >> >>> 
>> >> >>>    ServerAdmin jigalroe...@gmail.com <mailto:jigalroe...@gmail.com>
>> >> >>>
>> >> >>>    DocumentRoot /var/www/nrka/public/
>> >> >>>    ServerName nrka
>> >> >>> 
>> >> >>>        Options Indexes FollowSymLinks MultiViews
>> >> >>>        AllowOverride None
>> >> >>
>> >> >> AllowOverride All.
>> >> >>>
>> >> >>>        Order allow,deny
>> >> >&

Re: [fw-general] Has anyone ported ZF project from Windows to Linux before?

2009-11-29 Thread Bradley Holt
Have you restarted Apache since changing your virtual host
configuration? Are you still getting a 404 or a different error now?

On Sun, Nov 29, 2009 at 4:34 PM, Jigal sanders  wrote:
> this is what i have in my .htaccess file on the public directory
>
> SetEnv APPLICATION_ENV development
>
> RewriteEngine On
> RewriteCond %{REQUEST_FILENAME} -s [OR]
> RewriteCond %{REQUEST_FILENAME} -l [OR]
> RewriteCond %{REQUEST_FILENAME} -d
> RewriteRule ^.*$ - [NC,L]
> RewriteRule ^.*$ index.php [NC,L]
>
> On Sun, Nov 29, 2009 at 10:32 PM, Bradley Holt 
> wrote:
>>
>> What do your rewrite rules look like?
>>
>> On Sun, Nov 29, 2009 at 4:29 PM, Jigal sanders 
>> wrote:
>> > No I have this:
>> >
>> > 
>> >     ServerAdmin jigalroe...@gmail.com
>> >
>> >     DocumentRoot /var/www/nrka/public/
>> >     ServerName nrka
>> >     
>> >         Options Indexes FollowSymLinks MultiViews
>> >         AllowOverride All
>> >         Order allow,deny
>> >         allow from all
>> >     
>> >     ##ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
>> >     ##
>> >     ##    AllowOverride None
>> >     ##    Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
>> >     ##    Order allow,deny
>> >     ##    Allow from all
>> >     ##
>> >
>> >     ErrorLog /var/log/apache2/error.log
>> >
>> >     # Possible values include: debug, info, notice, warn, error, crit,
>> >     # alert, emerg.
>> >     LogLevel warn
>> >
>> >     CustomLog /var/log/apache2/access.log combined
>> >
>> >     Alias /doc/ "/usr/share/doc/"
>> >     
>> >     Options Indexes MultiViews FollowSymLinks
>> >     AllowOverride All
>> >     Order deny,allow
>> >     Deny from all
>> >     Allow from 127.0.0.0/255.0.0.0 ::1/128
>> >     
>> >
>> > 
>> >
>> > but it still doesn't work. I have the idea that there is too much in
>> > this
>> > file.
>> >
>> > On Sun, Nov 29, 2009 at 10:25 PM, Sudheer Satyanarayana
>> >  wrote:
>> >>
>> >> On Monday 30 November 2009 02:40 AM, Jigal sanders wrote:
>> >>>
>> >>> Well,
>> >>>
>> >>> my first problem is that it gets to my webroot but when I click on a
>> >>> link, it doesn't follow my controller and action. I rather get an
>> >>> error:
>> >>>
>> >>> The requested URL /authentication/login was not found on this server.
>> >>>
>> >>> the whole structure is exactly coppied to my project on ubuntu.
>> >>>
>> >>> can it be something in my vhost config?
>> >>>
>> >>> 
>> >>>    ServerAdmin jigalroe...@gmail.com <mailto:jigalroe...@gmail.com>
>> >>>
>> >>>    DocumentRoot /var/www/nrka/public/
>> >>>    ServerName nrka
>> >>> 
>> >>>        Options Indexes FollowSymLinks MultiViews
>> >>>        AllowOverride None
>> >>
>> >> AllowOverride All.
>> >>>
>> >>>        Order allow,deny
>> >>>        allow from all
>> >>> 
>> >>>    ##ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
>> >>>    ##
>> >>>    ##    AllowOverride None
>> >>>    ##    Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
>> >>>    ##    Order allow,deny
>> >>>    ##    Allow from all
>> >>>    ##
>> >>>
>> >>>    ErrorLog /var/log/apache2/error.log
>> >>>
>> >>>    # Possible values include: debug, info, notice, warn, error, crit,
>> >>>    # alert, emerg.
>> >>>    LogLevel warn
>> >>>
>> >>>    CustomLog /var/log/apache2/access.log combined
>> >>>
>> >>>    Alias /doc/ "/usr/share/doc/"
>> >>> 
>> >>>        Options Indexes MultiViews FollowSymLinks
>> >>>        AllowOverride None
>> >>
>> >> AllowOverride All.
>> >>
>> >> You have to allow the .htaccess files to override settings. Or just put
>> >> up
>> >> the rewrite rules in the  section of Apache configuration.
>> >>
>> >> --
>> >>
>> >> With warm regards,
>> >> Sudheer. S
>> >> Tech stuff: http://techchorus.net
>> >> Business: http://binaryvibes.co.in
>> >>
>> >
>> >
>> >
>> > --
>> > Met vriendelijke groet,
>> >
>> > Jigal Sanders
>> > A.J. Ernststraat 739
>> > 1082 LK Amsterdam
>> > Mobiel: 06-42111489
>> >
>>
>>
>>
>> --
>> Bradley Holt
>> bradley.h...@foundline.com
>
>
>
> --
> Met vriendelijke groet,
>
> Jigal Sanders
> A.J. Ernststraat 739
> 1082 LK Amsterdam
> Mobiel: 06-42111489
>



-- 
Bradley Holt
bradley.h...@foundline.com


Re: [fw-general] Has anyone ported ZF project from Windows to Linux before?

2009-11-29 Thread Bradley Holt
What do your rewrite rules look like?

On Sun, Nov 29, 2009 at 4:29 PM, Jigal sanders  wrote:
> No I have this:
>
> 
>     ServerAdmin jigalroe...@gmail.com
>
>     DocumentRoot /var/www/nrka/public/
>     ServerName nrka
>     
>         Options Indexes FollowSymLinks MultiViews
>         AllowOverride All
>         Order allow,deny
>         allow from all
>     
>     ##ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
>     ##
>     ##    AllowOverride None
>     ##    Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
>     ##    Order allow,deny
>     ##    Allow from all
>     ##
>
>     ErrorLog /var/log/apache2/error.log
>
>     # Possible values include: debug, info, notice, warn, error, crit,
>     # alert, emerg.
>     LogLevel warn
>
>     CustomLog /var/log/apache2/access.log combined
>
>     Alias /doc/ "/usr/share/doc/"
>     
>     Options Indexes MultiViews FollowSymLinks
>     AllowOverride All
>     Order deny,allow
>     Deny from all
>     Allow from 127.0.0.0/255.0.0.0 ::1/128
>     
>
> 
>
> but it still doesn't work. I have the idea that there is too much in this
> file.
>
> On Sun, Nov 29, 2009 at 10:25 PM, Sudheer Satyanarayana
>  wrote:
>>
>> On Monday 30 November 2009 02:40 AM, Jigal sanders wrote:
>>>
>>> Well,
>>>
>>> my first problem is that it gets to my webroot but when I click on a
>>> link, it doesn't follow my controller and action. I rather get an error:
>>>
>>> The requested URL /authentication/login was not found on this server.
>>>
>>> the whole structure is exactly coppied to my project on ubuntu.
>>>
>>> can it be something in my vhost config?
>>>
>>> 
>>>    ServerAdmin jigalroe...@gmail.com <mailto:jigalroe...@gmail.com>
>>>
>>>    DocumentRoot /var/www/nrka/public/
>>>    ServerName nrka
>>> 
>>>        Options Indexes FollowSymLinks MultiViews
>>>        AllowOverride None
>>
>> AllowOverride All.
>>>
>>>        Order allow,deny
>>>        allow from all
>>> 
>>>    ##ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
>>>    ##
>>>    ##    AllowOverride None
>>>    ##    Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
>>>    ##    Order allow,deny
>>>    ##    Allow from all
>>>    ##
>>>
>>>    ErrorLog /var/log/apache2/error.log
>>>
>>>    # Possible values include: debug, info, notice, warn, error, crit,
>>>    # alert, emerg.
>>>    LogLevel warn
>>>
>>>    CustomLog /var/log/apache2/access.log combined
>>>
>>>    Alias /doc/ "/usr/share/doc/"
>>> 
>>>        Options Indexes MultiViews FollowSymLinks
>>>        AllowOverride None
>>
>> AllowOverride All.
>>
>> You have to allow the .htaccess files to override settings. Or just put up
>> the rewrite rules in the  section of Apache configuration.
>>
>> --
>>
>> With warm regards,
>> Sudheer. S
>> Tech stuff: http://techchorus.net
>> Business: http://binaryvibes.co.in
>>
>
>
>
> --
> Met vriendelijke groet,
>
> Jigal Sanders
> A.J. Ernststraat 739
> 1082 LK Amsterdam
> Mobiel: 06-42111489
>



-- 
Bradley Holt
bradley.h...@foundline.com


Re: [fw-general] Has anyone ported ZF project from Windows to Linux before?

2009-11-29 Thread Bradley Holt
>From what you described, it sounds like you're just missing your
rewrite rules. See:

http://framework.zend.com/manual/en/project-structure.rewrite.html

On Sun, Nov 29, 2009 at 4:10 PM, Jigal sanders  wrote:
> Well,
>
> my first problem is that it gets to my webroot but when I click on a link,
> it doesn't follow my controller and action. I rather get an error:
>
> The requested URL /authentication/login was not found on this server.
>
> the whole structure is exactly coppied to my project on ubuntu.
>
> can it be something in my vhost config?
>
> 
>     ServerAdmin jigalroe...@gmail.com
>
>     DocumentRoot /var/www/nrka/public/
>     ServerName nrka
>     
>         Options Indexes FollowSymLinks MultiViews
>         AllowOverride None
>         Order allow,deny
>         allow from all
>     
>     ##ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
>     ##
>     ##    AllowOverride None
>     ##    Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
>     ##    Order allow,deny
>     ##    Allow from all
>     ##
>
>     ErrorLog /var/log/apache2/error.log
>
>     # Possible values include: debug, info, notice, warn, error, crit,
>     # alert, emerg.
>     LogLevel warn
>
>     CustomLog /var/log/apache2/access.log combined
>
>     Alias /doc/ "/usr/share/doc/"
>     
>     Options Indexes MultiViews FollowSymLinks
>     AllowOverride None
>     Order deny,allow
>     Deny from all
>     Allow from 127.0.0.0/255.0.0.0 ::1/128
>     
>
> 
>
>
>
>
> On Sun, Nov 29, 2009 at 6:26 PM, Bradley Holt 
> wrote:
>>
>> If you can provide more detail about what doesn't work (error
>> messages, etc.) then you will probably be more likely to get some
>> helpful responses. ZF applications (like PHP applications in general)
>> are usually portable between platforms with little or no work. It's
>> possible that you're taking advantage of some platform specific
>> feature but it's more likely that you don't have a required extension
>> installed or that it's simply a configuration issue. The ZF
>> documentation has a list of required extensions and what components
>> use those extensions:
>>
>> http://framework.zend.com/manual/en/requirements.html
>>
>> On Sun, Nov 29, 2009 at 11:50 AM, W Itch
>>  wrote:
>> > Hi, has anyone ported ZF project from Windows Vista to Linux Debian
>> > before?
>> > The ZF project which I worked on was fully functional on Vista but
>> > when I moved it to my Debian machine then nothing works anymore.
>> >
>> > Can you tell me what the most common things I should take care is
>> > about in general, when porting ZF code from one platform to another?
>> >
>>
>> --
>> Bradley Holt
>> bradley.h...@foundline.com
>
>
>
> --
> Met vriendelijke groet,
>
> Jigal Sanders
> A.J. Ernststraat 739
> 1082 LK Amsterdam
> Mobiel: 06-42111489
>

-- 
Bradley Holt
bradley.h...@foundline.com


Re: [fw-general] Has anyone ported ZF project from Windows to Linux before?

2009-11-29 Thread Bradley Holt
If you can provide more detail about what doesn't work (error
messages, etc.) then you will probably be more likely to get some
helpful responses. ZF applications (like PHP applications in general)
are usually portable between platforms with little or no work. It's
possible that you're taking advantage of some platform specific
feature but it's more likely that you don't have a required extension
installed or that it's simply a configuration issue. The ZF
documentation has a list of required extensions and what components
use those extensions:

http://framework.zend.com/manual/en/requirements.html

On Sun, Nov 29, 2009 at 11:50 AM, W Itch
 wrote:
> Hi, has anyone ported ZF project from Windows Vista to Linux Debian before?
> The ZF project which I worked on was fully functional on Vista but
> when I moved it to my Debian machine then nothing works anymore.
>
> Can you tell me what the most common things I should take care is
> about in general, when porting ZF code from one platform to another?
>

-- 
Bradley Holt
bradley.h...@foundline.com


Re: [fw-general] Adding onload event to body on one page only

2009-11-27 Thread Bradley Holt
Actually, one part of this would be ZF specific. You would need to be
able to write a selector that only listens to events on one particular
module/controller/action. I typically do this with a Route Context
plugin that includes the module, controller, and action names as body
classes (and sometimes other application specific data depending on my
needs). This isn't perfect: you need to watch out for naming conflicts
between modules, controllers, and actions (or use prefixes in your
class names). However, once you have body classes that are unique for
various modules, controllers, and actions you can use those as part of
your selectors in jQuery (or whatever JavaScript library you're
using). Here's some example code:

http://gist.github.com/244249

On Fri, Nov 27, 2009 at 4:31 PM, Bradley Holt
 wrote:
> I'd consider using unobtrusive JavaScript so that you can add event
> listeners without having to add them directly to your body element.
> You can do this with jQuery or pretty much any other JavaScript
> library. Email me off-list if you want more info on how this would be
> done (since it's not ZF related).
>
> On Fri, Nov 27, 2009 at 3:45 PM, tonystamp  wrote:
>>
>> Hello
>>
>> I am using a layout for about 30 pages, but one page which has a google map
>> embedded in it requires that i add two events to the body tag of the
>> document. Obviously i don't want to add it for every page that doesn't need
>> it, so i'm not going to add it to the layout (it would also cause js errors,
>> as the js code is included in the page with the map in it).
>>
>> Is there a way to simply add the extra line of code to the body in the
>> controller, or will i need to use another layout to define the body events
>> just for that page? It would seem a waste, as everything else is identical
>> :?
>> --
>> View this message in context: 
>> http://n4.nabble.com/Adding-onload-event-to-body-on-one-page-only-tp797274p797274.html
>> Sent from the Zend Framework mailing list archive at Nabble.com.
>>
>
>
>
> --
> Bradley Holt
> bradley.h...@foundline.com
>



-- 
Bradley Holt
bradley.h...@foundline.com


Re: [fw-general] Adding onload event to body on one page only

2009-11-27 Thread Bradley Holt
I'd consider using unobtrusive JavaScript so that you can add event
listeners without having to add them directly to your body element.
You can do this with jQuery or pretty much any other JavaScript
library. Email me off-list if you want more info on how this would be
done (since it's not ZF related).

On Fri, Nov 27, 2009 at 3:45 PM, tonystamp  wrote:
>
> Hello
>
> I am using a layout for about 30 pages, but one page which has a google map
> embedded in it requires that i add two events to the body tag of the
> document. Obviously i don't want to add it for every page that doesn't need
> it, so i'm not going to add it to the layout (it would also cause js errors,
> as the js code is included in the page with the map in it).
>
> Is there a way to simply add the extra line of code to the body in the
> controller, or will i need to use another layout to define the body events
> just for that page? It would seem a waste, as everything else is identical
> :?
> --
> View this message in context: 
> http://n4.nabble.com/Adding-onload-event-to-body-on-one-page-only-tp797274p797274.html
> Sent from the Zend Framework mailing list archive at Nabble.com.
>



-- 
Bradley Holt
bradley.h...@foundline.com


Re: [fw-general] Re: optgroup class or id

2009-11-08 Thread Bradley Holt
On Sun, Nov 8, 2009 at 1:44 PM, Matthew Weier O'Phinney
 wrote:
> Can you add an issue to the tracker for this, along with your patch? The
> feature has been requested more than once. :)
>

Sure, opened as ZF-8252 (not sure why the formatting got hosed):

http://framework.zend.com/issues/browse/ZF-8252

> -- Bradley Holt  wrote
> (on Sunday, 08 November 2009, 01:28 PM -0500):
>> I dug into the rendering code in Zend_View_Helper_FormSelect. Based on
>> how the optgroup element is created I can see that there's no way to
>> add an id or class to the optgroup. Here is a patch that should allow
>> for the following use case but should still be backwards compatible.
>> This is not necessarily the best way to do this and could probably be
>> a lot better: I put it together very quickly. The existing code
>> doesn't seem to follow the Zend Framework coding standards so I kept
>> my new code similar to the code that's already there. Again, this
>> could be a lot more extensible than it is (e.g. it only allows for id
>> and not class or other arbitrary decorators).
>>
>> Here is the use case that will give the desired output in my previous
>> email (id attribute on optgroup elements):
>>
>>         $optgroupTest = new Zend_Form_Element_Select('optgroup_test');
>>         $options = array (
>>             array(
>>                 'id'    => 'option_group_1',
>>                 'label' => 'Option Group 1',
>>                 'options' => array (
>>                     'A'     => 'Option A',
>>                     'B'     => 'Option B',
>>                     'C'     => 'Option C',
>>                 ),
>>             ),
>>             array(
>>                 'id'    => 'option_group_2',
>>                 'label' => 'Option Group 2',
>>                 'options' => array (
>>                     'D'     => 'Option D',
>>                 ),
>>             ),
>>         );
>>         $optgroupTest
>>             ->setLabel('Optgroup Test')
>>             ->addMultiOptions(
>>                 $options
>>             )
>>         ;
>>
>> Here is the patch against Zend Framework 1.9.5 (tags/release-1.9.5)
>> that will make the above use case work (patch attached as well):
>>
>> Index: View/Helper/FormSelect.php
>> ===
>> --- View/Helper/FormSelect.php        (revision 18900)
>> +++ View/Helper/FormSelect.php        (working copy)
>> @@ -116,6 +116,15 @@
>>          $translator = $this->getTranslator();
>>          foreach ((array) $options as $opt_value => $opt_label) {
>>              if (is_array($opt_label)) {
>> +                $opt_id = '';
>> +                if (is_integer($opt_value)) {
>> +                    $opt_array = $opt_label;
>> +                    if (array_key_exists('id', $opt_array)) {
>> +                        $opt_id = ' id="' . $opt_array['id'] . '"';
>> +                    }
>> +                    $opt_value = $opt_array['label'];
>> +                    $opt_label = $opt_array['options'];
>> +                }
>>                  $opt_disable = '';
>>                  if (is_array($disable) && in_array($opt_value, $disable)) {
>>                      $opt_disable = ' disabled="disabled"';
>> @@ -124,6 +133,7 @@
>>                      $opt_value = $translator->translate($opt_value);
>>                  }
>>                  $list[] = '> +                        . $opt_id
>>                          . $opt_disable
>>                          . ' label="' . $this->view->escape($opt_value) 
>> .'">';
>>                  foreach ($opt_label as $val => $lab) {
>>
>> ---
>>
>> Thanks,
>> Bradley
>
>
>
> --
> Matthew Weier O'Phinney
> Project Lead            | matt...@zend.com
> Zend Framework          | http://framework.zend.com/
>


[fw-general] Re: optgroup class or id

2009-11-08 Thread Bradley Holt
I dug into the rendering code in Zend_View_Helper_FormSelect. Based on
how the optgroup element is created I can see that there's no way to
add an id or class to the optgroup. Here is a patch that should allow
for the following use case but should still be backwards compatible.
This is not necessarily the best way to do this and could probably be
a lot better: I put it together very quickly. The existing code
doesn't seem to follow the Zend Framework coding standards so I kept
my new code similar to the code that's already there. Again, this
could be a lot more extensible than it is (e.g. it only allows for id
and not class or other arbitrary decorators).

Here is the use case that will give the desired output in my previous
email (id attribute on optgroup elements):

$optgroupTest = new Zend_Form_Element_Select('optgroup_test');
$options = array (
array(
'id'=> 'option_group_1',
'label' => 'Option Group 1',
'options' => array (
'A' => 'Option A',
'B' => 'Option B',
'C' => 'Option C',
),
),
array(
'id'=> 'option_group_2',
'label' => 'Option Group 2',
'options' => array (
'D' => 'Option D',
),
),
);
$optgroupTest
->setLabel('Optgroup Test')
->addMultiOptions(
$options
)
;

Here is the patch against Zend Framework 1.9.5 (tags/release-1.9.5)
that will make the above use case work (patch attached as well):

Index: View/Helper/FormSelect.php
===
--- View/Helper/FormSelect.php  (revision 18900)
+++ View/Helper/FormSelect.php  (working copy)
@@ -116,6 +116,15 @@
 $translator = $this->getTranslator();
 foreach ((array) $options as $opt_value => $opt_label) {
 if (is_array($opt_label)) {
+$opt_id = '';
+if (is_integer($opt_value)) {
+$opt_array = $opt_label;
+if (array_key_exists('id', $opt_array)) {
+$opt_id = ' id="' . $opt_array['id'] . '"';
+}
+$opt_value = $opt_array['label'];
+$opt_label = $opt_array['options'];
+}
 $opt_disable = '';
 if (is_array($disable) && in_array($opt_value, $disable)) {
 $opt_disable = ' disabled="disabled"';
@@ -124,6 +133,7 @@
 $opt_value = $translator->translate($opt_value);
 }
 $list[] = '';
 foreach ($opt_label as $val => $lab) {

---

Thanks,
Bradley


FormSelect.patch
Description: Binary data


[fw-general] optgroup class or id

2009-11-08 Thread Bradley Holt
I'm trying to create a Zend_Form_Element_Select with option groups
(optgroup) that each have their own class or id (preferably id). Is
there a way to do this? I need to be able to select specific optgroups
in JavaScript to enable/disable them which is why I need an id or
class (selecting on label would be a messy hack). Here is code similar
to what I'm using:

---

$optgroupTest = new Zend_Form_Element_Select('optgroup_test');
$options = array (
'Option Group 1'=> array (
'A' => 'Option A',
'B' => 'Option B',
'C' => 'Option C',
),
'Option Group 2'=> array (
'D' => 'Option D',
),
);
$optgroupTest
->setLabel('Optgroup Test')
->addMultiOptions(
$options
)
;

---

The corresponding output:

---



Option A
Option B
Option C


Option D



---

The desired output (note the id on the two optgroup elements):

---



Option A
Option B
Option C


Option D



---

Is there any way with Zend_Form_Element_Select to get this desired
output? As I said before, either an id or class on optgroup elements
would be acceptable.

Thanks,
Bradley


Re: [fw-general] Zend_Feed_Reader Categories

2009-10-24 Thread Bradley Holt
Pádraic,

Thanks! Added as ZF-8144:

http://framework.zend.com/issues/browse/ZF-8144

By the way, Zend_Feed_Reader has been very useful!

Thanks,
Bradley

On Sat, Oct 24, 2009 at 9:22 PM, Pádraic Brady  wrote:
> Hi Bradley,
>
> Sure - it just didn't quite make the timeline for 1.9, and with 1.10 not yet
> scheduled it was left by the wayside while I fixed up some other areas (like
> the support for relative URLs in Atom). Since you asked though, I'll get it
> added to trunk during the week. You can file an improvement issue if you
> want to track it.
>
> Paddy
>
> Pádraic Brady
>
> http://blog.astrumfutura.com
> http://www.survivethedeepend.com
> OpenID Europe Foundation Irish Representative
>
>
> 
> From: Bradley Holt 
> To: Zend Framework General 
> Sent: Sat, October 24, 2009 10:42:39 PM
> Subject: [fw-general] Zend_Feed_Reader Categories
>
> Are there any plans to add support for categories in Zend_Feed_Reader?
> A getCategories method on Zend_Feed_Reader_FeedInterface and
> Zend_Feed_Reader_EntryInterface would be very useful. A cursory glance
> shows that both Atom and RSS support categories.
>
> Thanks,
> Bradley
>
> --
> Bradley Holt
> bradley.h...@foundline.com
>

-- 
Bradley Holt
bradley.h...@foundline.com


[fw-general] Zend_Feed_Reader Categories

2009-10-24 Thread Bradley Holt
Are there any plans to add support for categories in Zend_Feed_Reader?
A getCategories method on Zend_Feed_Reader_FeedInterface and
Zend_Feed_Reader_EntryInterface would be very useful. A cursory glance
shows that both Atom and RSS support categories.

Thanks,
Bradley

-- 
Bradley Holt
bradley.h...@foundline.com


Re: [fw-general] Zend_Rest_Controller - how to pass params in the URI for POST requests

2009-10-05 Thread Bradley Holt
Sudheer,

I'm not sure why that would be routed as a PUT request if your HTTP
Method is POST and you don't have a  "_method=PUT" parameter or a
"X-HTTP-Method-Override: PUT" HTTP Header. However, if your
application is going to be RESTful then your URIs should identify your
resources and *not* carry additional data that isn't part of
identifying the resource. So, you should just:

POST /webservice/lead

not:

POST /webservice/lead/apikey/myapikey

In other words, apikey/myapikey does not do anything to identify the
resource so should not be part of your URI. If your clients must use
an API key, then you could have them send it as an HTTP Header. The
most RESTful thing (but may or may not the most practical) would
probably be to have your clients use HTTP authentication. From what
I've seen, this is a topic of much debate (how to implement  practical
and RESTful authentication).

Thanks,
Bradley

On Mon, Oct 5, 2009 at 11:00 AM, Sudheer Satyanarayana
 wrote:
> Hi,
>
> In my application, I have a module - 'webservice' to handle all REST
> requests.
>
> In my front controller I check if the request has a valid API key in the
> request URI parameters. If a valid key is not found access is denied.
>
> Example URI with API key : example.com/webservice/lead/apikey/myapikey
>
> My problem is, Zend_Rest_Route routes the request to putAction() if it finds
> anything after module/controller/ in the URI even though the method is POST.
>
> Is it possible to route requests to postAction() and pass pass parameters in
> the URI?
>
> Or, is there a better way of managing API key checks for REST requests?
>
> --
>
> With warm regards,
> Sudheer. S
> Business: http://binaryvibes.co.in, Tech stuff: http://techchorus.net,
> Personal: http://sudheer.net
>
>
>



-- 
Bradley Holt
bradley.h...@foundline.com


Re: [fw-general] Fw: $request->getParams() returns escaped data

2009-07-13 Thread Bradley Holt
This isn't Zend Framework -- it sounds like you have magic quotes
turned on. These should be disabled[1] when using Zend Framework.

[1] http://us3.php.net/manual/en/security.magicquotes.disabling.php

On Mon, Jul 13, 2009 at 3:44 PM, Muhammad Ali wrote:
> Hi
>
> Just wanted to check if escaping for $request->getParams() can be turned off
> e.g. single quote( ' ) is replaced by ( \' ). I have tried it before calling
> any other methods but still the same, is there any helper or plugin I need
> to set options for?
>
> If it is a default, why I should create a filter to strip slashes while
> printing values where as if i can not put them as the first place.
>
> Thanks


-- 
Bradley Holt
bradley.h...@foundline.com


Re: [fw-general] Zend_feed + Twitter Search Atom

2009-06-12 Thread Bradley Holt
Try:

$entry->link('alternate');

That works for me when using the Twitter feed.

Thanks,
Bradley

2009/6/12 José de Menezes Soares Neto 
>
> Hello,
>
> I tried to fetch
>
> http://search.twitter.com/search.atom?q=&lang=all&rpp=100&show_user=true
>
> But I can´t get the content of  tag inside the  tags.
>
> Anyone knows how to get it?
>
> The full code is:
>
> $feed = 
> Zend_Feed::import('http://search.twitter.com/search.atom?q=&lang=all&rpp=100&show_user=true');
>
> foreach ($feed as $entry) {
>
>  $results[] = array(
>     'id'    => $entry->id(),
>     'content'   => $entry->content(),
>     'published' => $entry->published(),
>         'link'  => $entry->link() // but this is an array 
> with Dom elements...
>     );
>
> }
>
> Regards,
>
> José



--
Bradley Holt
bradley.h...@foundline.com


Re: [fw-general] New proposal for Zend_Filter_StringLength

2009-04-12 Thread Bradley Holt
Thomas,

This would be most welcome! Is this proposal a response to, or related
to, ZF-4734 (http://framework.zend.com/issues/browse/ZF-4734)?

Thanks,
Bradley

On Sun, Apr 12, 2009 at 5:12 PM, Thomas Weidner  wrote:
> Hy interested ones,
>
> there is a new proposal waiting for your comments:
> http://framework.zend.com/wiki/display/ZFPROP/Zend_Filter_StringLength+-+Thomas+Weidner
>
> It will add the possibility to pad/extend and truncate a string to a given
> length by using filters.
>
> Greetings
> Thomas Weidner, I18N Team Leader, Zend Framework
> http://www.thomasweidner.com
>



-- 
Bradley Holt
bradley.h...@foundline.com


Re: [fw-general] Zend View vs. Smarty

2009-03-25 Thread Bradley Holt
On Wed, Mar 25, 2009 at 1:12 PM, Alex Howansky  wrote:
>
>> A lot have been discussed, but anyway it is still difficult to decide. A
>> project is to be developed, and more persons will have to work at it. Those
>> persons will have some experience in ZF and probably also in Smarty. The
>> problem is: what are the advantages and disadvantages of using ZF Template
>> Engine vs. Smarty. How much of you use Smarty? Why do you prefer
>> Smart/Zend_View?
>
> I think the greatest advantage to using a non-PHP templating engine in your
> view layer is that you can force logical isolation between your designers
> and your programmers. This is especially important if you have untrusted or
> external designers providing input for your product. I.e., you do not want
> your designers to be able to do things like this in a view template:
>
> 
> unlink('/path/to/file');
>
> $db = new PDO('...');
> $db->query('drop table ... ');
>
> ?>
>

Yes, but how many Smarty setups end up allowing the {php} tag because
there's something that they can't do in Smarty or it is easier to do
directly in PHP? My guess is that this is pretty common and, when it's
enabled, you're back to needing to trust the external designers. If
you're going to have untrusted input, I'm not sure that the view
script or templating layer is the appropriate place to handle this
untrusted input (I mean the view script or templating layer *itself*;
not *within* the view script or templating layer where handling
untrusted input is, in fact, perfectly appropriate).

This brings up an interesting point. Perhaps there's interest in
allowing/disallowing specific functionality within ZF view scripts?
I'm not sure how feasible this is from a technical point-of-view, but
perhaps it's something worth proposing if someone has a need for this
ability. It's not something I need (I trust the person working in my
view scripts), but sounds like it may be of interest to some.

Thanks,
Bradley

--
Bradley Holt
bradley.h...@foundline.com


Re: [fw-general] Zend View vs. Smarty

2009-03-25 Thread Bradley Holt
Before there were MVC frameworks available in PHP, Smarty was very
useful. It helped keep business logic separate from presentation.
However, within an MVC framework like Zend Framework, Smarty is no
longer needed and actually adds unnecessary complication. As far as I
know (and yes, I used to use Smarty) everything that was possible with
Smarty is now possible with ZF MVC and view scripts.

Smarty solved the wrong problem (I think someone else said this, sorry
that I can't remember who). The problem isn't mixing PHP with
presentation (the problem that Smarty solved), the problem is mixing
business logic and presentation (the problem that MVC and view scripts
solve). Yes, Smarty helped keep your business logic separate from your
presentation layer and it did a good job of this. However, there's no
reason to keep PHP out of your presentation layer (and lots of good
reasons *to* use it in your presentation layer) if you have another
way to keep business logic and presentation separate - which is
exactly what ZF view scripts do.

Thanks,
Bradley

On Wed, Mar 25, 2009 at 12:31 PM, Andrei Iarus  wrote:
>
> Hello there,
>
> A lot have been discussed, but anyway it is still difficult to decide. A 
> project is to be developed, and more persons will have to work at it. Those 
> persons will have some experience in ZF and probably also in Smarty. The 
> problem is: what are the advantages and disadvantages of using ZF Template 
> Engine vs. Smarty. How much of you use Smarty? Why do you prefer 
> Smart/Zend_View?
>
> I see as advatages for Zend_View:
> 1. Some packages from ZF use Zend_View (Zend Layout, Zend Form, other 
> examples?), so if we would use Smarty and use those packages (which we'll 
> do), we will need to extend the abstract classes. Also it is possible that 
> new comming features will use Zend_View.
> 2. Easier to learn than Smarty (right?), as it is clean PHP.
>
> As an advantage for Smarty:
> 1. It is more popular than Zend_View (right?) .
> 2. It has those built-in common-used functions (ex. excaping functions).
> 3. One can say it is easier/more pleasant to develop in Smarty (it is for a 
> long time a stand-alone V(iew) component (from MVC) )
>
> What would you decide if you were in my place?
>
> Thank you very much in advance.



--
Bradley Holt
bradley.h...@foundline.com


Re: [fw-general] SECURITY ADVISORY

2009-03-20 Thread Bradley Holt
Wil,

On Fri, Mar 20, 2009 at 3:40 PM, Wil Sinclair  wrote:

>  Good question. We will not be incrementing the release number. This might
> cause confusion for 2 reasons: no release was actually built and offered on
> the site, and it would blur our policy of leaving old releases branches
> completely behind. Obviously we’re making an exception for security patches
> on the second point, although as a community we should really be putting the
> effort in to testing BC so that few people will have to take advantage of
> this update method. So, for these reasons, we’d prefer to use the patch
> convention: 1.7.7-p1, for example.
>
>
>
> Matthew will be creating a p2 tag later today, and may create a p1 tag next
> week (there shouldn’t be anyone who should need this tag at this point + it
> is complicated by the commit order of the backports).
>

That is great, thanks! It seems more appropriate for me to use a tag in my
svn:externals so that I know exactly what codebase I'm getting and it
doesn't change on me until I make the decision (I know, I could just specify
the revision number). I can understand why you'd want to use the patch
convention to make it clear that you're not supporting that branch anymore
(except for security patches) - definitely makes sense to me.

>
>
> As always, thanks for the feedback!
>

Of course!

Thanks,
Bradley


>
>
> ,Wil
>
>
>
>
>
> *From:* Bradley Holt [mailto:bradley.h...@foundline.com]
> *Sent:* Friday, March 20, 2009 12:22 PM
> *To:* Wil Sinclair
> *Cc:* fw-general@lists.zend.com
> *Subject:* Re: [fw-general] SECURITY ADVISORY
>
>
>
> Wil,
>
> We have one project that is running on a client's RHEL server and are using
> ZF 1.6.2 due to compatibility issues. I see that these fixes have been
> backported to the release-1.6 branch but no new tag was created (the last
> tag in 1.6 is 1.6.2 last updated on 10/12/2008). Wouldn't it be appropriate
> to create a new 1.6.3 tag with this backported fix? If not, I can simply
> switch my svn:externals to use the branch instead of a tag but it just seems
> more appropriate for me to use tags instead of branches in my svn:externals.
>
> Thanks,
> Bradley
>
> On Thu, Mar 19, 2009 at 4:56 PM, Wil Sinclair  wrote:
>
> The Zend Framework team was recently notified of an XSS attack vector in
> its Zend_Filter_StripTags class. Zend_Filter_StripTags offers the ability to
> strip HTML tags from text, but also to selectively choose which tags and
> specific attributes of those tags to keep.
>
>
>
> The XSS attack vector was due to a bug in matching HTML tag attributes to
> retain. If whitespace was introduced surrounding the attribute assignment
> operator or the value included newline characters, the attribute would
> always be included in the final output- even if it was not marked to retain.
>
>
>
> A security fix has been created and released with Zend Framework 1.7.7.
>
>
>
> Additionally, the fix has been back-ported to the 1.6, 1.5, and 1.0 release
> branches.
>
>
>
> The Zend Framework team strongly recommends upgrading to version 1.7.7. If
> you cannot upgrade at this time, we recommend exporting from the release
> branch matching the minor release you are currently using, or downloading
> the file listed below and pushing it into your Zend Framework installation.
>
>
>
>
> http://framework.zend.com/svn/framework/standard/branches/release-1.7/library/Zend/Filter/StripTags.php
>
>
>
> Thank you.
>
>
>
> ,Wil
>
>
>
>
>
>
> --
> Bradley Holt
> bradley.h...@foundline.com
>



-- 
Bradley Holt
bradley.h...@foundline.com


Re: [fw-general] SECURITY ADVISORY

2009-03-20 Thread Bradley Holt
Wil,

We have one project that is running on a client's RHEL server and are using
ZF 1.6.2 due to compatibility issues. I see that these fixes have been
backported to the release-1.6 branch but no new tag was created (the last
tag in 1.6 is 1.6.2 last updated on 10/12/2008). Wouldn't it be appropriate
to create a new 1.6.3 tag with this backported fix? If not, I can simply
switch my svn:externals to use the branch instead of a tag but it just seems
more appropriate for me to use tags instead of branches in my svn:externals.

Thanks,
Bradley

On Thu, Mar 19, 2009 at 4:56 PM, Wil Sinclair  wrote:

>  The Zend Framework team was recently notified of an XSS attack vector in
> its Zend_Filter_StripTags class. Zend_Filter_StripTags offers the ability to
> strip HTML tags from text, but also to selectively choose which tags and
> specific attributes of those tags to keep.
>
>
>
> The XSS attack vector was due to a bug in matching HTML tag attributes to
> retain. If whitespace was introduced surrounding the attribute assignment
> operator or the value included newline characters, the attribute would
> always be included in the final output- even if it was not marked to retain.
>
>
>
> A security fix has been created and released with Zend Framework 1.7.7.
>
>
>
> Additionally, the fix has been back-ported to the 1.6, 1.5, and 1.0 release
> branches.
>
>
>
> The Zend Framework team strongly recommends upgrading to version 1.7.7. If
> you cannot upgrade at this time, we recommend exporting from the release
> branch matching the minor release you are currently using, or downloading
> the file listed below and pushing it into your Zend Framework installation.
>
>
>
>
> http://framework.zend.com/svn/framework/standard/branches/release-1.7/library/Zend/Filter/StripTags.php
>
>
>
> Thank you.
>
>
>
> ,Wil
>
>
>



-- 
Bradley Holt
bradley.h...@foundline.com


Re: [fw-general] PHP version requirement -- ZF 1.6.2 not compatible with php 5.1.6

2009-01-07 Thread Bradley Holt
This looks like it is related to ZF-5030:

http://framework.zend.com/issues/browse/ZF-5030

I ran into this while trying to install on a client's RHEL5 box. We had to
downgrade to ZF 1.6 and all seemed to work fine.

Thanks,
Bradley

On Wed, Jan 7, 2009 at 1:01 AM, ardx  wrote:

>
>
>
> >
> > We bumped the minimum supported PHP version to 5.2.4 for ZF >= 1.7.0.
> >
> > --
> > Matthew Weier O'Phinney
> > Software Architect   | matt...@zend.com
> > Zend Framework   | http://framework.zend.com/
> >
> >
>
> Further to my earlier messages, I find that with ZF 1.6.2 (from
>
> http://framework.zend.com/svn/framework/standard/tags/release-1.6.2/library/Zend/
> ),
> on php 5.1.6 this code:
>
>  ...
> echo $this->headTitle()
> ?>
>
> renders something like
>
> Object#xx
>
> (where xx is some number) rather than the title tags and text that it
> should
> render (and does render on a development server running 5.2x).
>
> If I change the code to
>
> echo $this->headTitle()->toString()
>
> the php 5.1.6 server gives me the same result as on the php 5.2+ one.
>
> So it seems something about the coding of that view helper in ZF 1.6.2
> relies on php to convert objects to strings which does not work in php ver
> 5.16.
>
> So, again, what is the latest version of ZF that is actually compatible
> with
> php 5.16?
>
> Owen
>
>
> --
> View this message in context:
> http://www.nabble.com/PHP-version-requirement-tp20904056p21325457.html
> Sent from the Zend Framework mailing list archive at Nabble.com.
>
>


-- 
Bradley Holt
bradley.h...@foundline.com


Re: [fw-general] Zend_Paginator Negative itemCountPerPage

2008-12-29 Thread Bradley Holt
Matt,

No problem and thanks for the info! I'll keep using -1 for now since
you say that will be forward-compatible. I've opened an enhancement
ticket as ZF-5376:
http://framework.zend.com/issues/browse/ZF-5376

Thanks,
Bradley

On Mon, Dec 29, 2008 at 5:18 PM, Matthew Ratzloff
 wrote:
> Hi Bradley,
> Sorry about the confusion, I misread your requirement.  The -1 trick is in
> fact not an intended feature (if it were, it would be 0, to be in line with
> typical PHP API), but if it works, use it for now.  Whatever fix will just
> test for < 1, so your code should be forward-compatible.
> I highly encourage you to file an enhancement ticket so that this can be
> implemented properly.  If you do, please copy and paste this e-mail exchange
> as a comment into the ticket.
> Thanks,
> -Matt
>
> On Mon, Dec 29, 2008 at 11:56 AM, Bradley Holt 
> wrote:
>>
>> Matt,
>>
>> Taking a closer look at the documentation, the "All" scrolling style
>> "returns every page." I'm not trying to show every page in the
>> paginator control, I'm trying to have an infinite item count *per
>> page* (which, of course, will make it so I have only one page of
>> items). Like I said, passing a negative one (-1) to the
>> setItemCountPerPage method does the job - I just don't know if this is
>> an intended feature or something that just happens to work now but may
>> not be supported in the future.
>>
>> Thanks,
>> Bradley
>>
>> On Mon, Dec 29, 2008 at 1:00 PM, Matthew Ratzloff
>>  wrote:
>> >
>> > Hi Bradley,
>> > Use the scrolling style "All" instead.
>> > Please see http://framework.zend.com/manual/en/zend.paginator.usage.html
>> > for more information.
>> > -Matt
>> >
>> > On Sun, Dec 28, 2008 at 6:40 PM, Bradley Holt
>> >  wrote:
>> >>
>> >> I was looking for a way to have Zend_Paginator show all of the items.
>> >> For example, I have a selector that allows a user to show 25, 50, 100,
>> >> or all records. I couldn't find any documentation but by experimenting
>> >> I found that I could pass a negative one (-1) to setItemCountPerPage
>> >> and it would show all items (actually, I think any negative number
>> >> will show all items). Since I couldn't find any documentation on this
>> >> I'm wondering if this is a supported feature of Zend_Paginator that
>> >> just happens to work now but might break in the future.
>> >>
>> >> Thanks,
>> >> Bradley
>> >>
>> >> --
>> >> Bradley Holt
>> >> bradley.h...@foundline.com
>> >
>>
>>
>>
>> --
>> Bradley Holt
>> bradley.h...@foundline.com
>
>



-- 
Bradley Holt
bradley.h...@foundline.com


Re: [fw-general] Zend_Paginator Negative itemCountPerPage

2008-12-29 Thread Bradley Holt
Matt,

Taking a closer look at the documentation, the "All" scrolling style
"returns every page." I'm not trying to show every page in the
paginator control, I'm trying to have an infinite item count *per
page* (which, of course, will make it so I have only one page of
items). Like I said, passing a negative one (-1) to the
setItemCountPerPage method does the job - I just don't know if this is
an intended feature or something that just happens to work now but may
not be supported in the future.

Thanks,
Bradley

On Mon, Dec 29, 2008 at 1:00 PM, Matthew Ratzloff
 wrote:
>
> Hi Bradley,
> Use the scrolling style "All" instead.
> Please see http://framework.zend.com/manual/en/zend.paginator.usage.html for 
> more information.
> -Matt
>
> On Sun, Dec 28, 2008 at 6:40 PM, Bradley Holt  
> wrote:
>>
>> I was looking for a way to have Zend_Paginator show all of the items.
>> For example, I have a selector that allows a user to show 25, 50, 100,
>> or all records. I couldn't find any documentation but by experimenting
>> I found that I could pass a negative one (-1) to setItemCountPerPage
>> and it would show all items (actually, I think any negative number
>> will show all items). Since I couldn't find any documentation on this
>> I'm wondering if this is a supported feature of Zend_Paginator that
>> just happens to work now but might break in the future.
>>
>> Thanks,
>> Bradley
>>
>> --
>> Bradley Holt
>> bradley.h...@foundline.com
>



--
Bradley Holt
bradley.h...@foundline.com


Re: [fw-general] Zend_Paginator Negative itemCountPerPage

2008-12-29 Thread Bradley Holt
Matt,

I'll give that a try, thanks! Since I really just want to change the item
count per page to "infinite" I was hoping I could simply do this by changing
my "count" parameter (like I do with the 25, 50, and 100 selectors) and
passing it on as is. I should probably just go ahead and enter a feature
request for this but I wanted to check first if it was supposed to work but
just not documented.

Thanks,
Bradley

On Mon, Dec 29, 2008 at 1:00 PM, Matthew Ratzloff
wrote:

> Hi Bradley,
> Use the scrolling style "All" instead.
>
> Please see http://framework.zend.com/manual/en/zend.paginator.usage.htmlfor 
> more information.
>
> -Matt
>
>
> On Sun, Dec 28, 2008 at 6:40 PM, Bradley Holt 
> wrote:
>
>> I was looking for a way to have Zend_Paginator show all of the items.
>> For example, I have a selector that allows a user to show 25, 50, 100,
>> or all records. I couldn't find any documentation but by experimenting
>> I found that I could pass a negative one (-1) to setItemCountPerPage
>> and it would show all items (actually, I think any negative number
>> will show all items). Since I couldn't find any documentation on this
>> I'm wondering if this is a supported feature of Zend_Paginator that
>> just happens to work now but might break in the future.
>>
>> Thanks,
>> Bradley
>>
>> --
>> Bradley Holt
>> bradley.h...@foundline.com
>>
>
>


-- 
Bradley Holt
bradley.h...@foundline.com


[fw-general] Zend_Paginator Negative itemCountPerPage

2008-12-28 Thread Bradley Holt
I was looking for a way to have Zend_Paginator show all of the items.
For example, I have a selector that allows a user to show 25, 50, 100,
or all records. I couldn't find any documentation but by experimenting
I found that I could pass a negative one (-1) to setItemCountPerPage
and it would show all items (actually, I think any negative number
will show all items). Since I couldn't find any documentation on this
I'm wondering if this is a supported feature of Zend_Paginator that
just happens to work now but might break in the future.

Thanks,
Bradley

--
Bradley Holt
bradley.h...@foundline.com


Re: [fw-general] SubForm "Label"

2008-12-05 Thread Bradley Holt
Matthew,

That certainly looks simpler than what I came up with. I'm guessing
it's a better option too, since you suggested it :-)

Thanks,
Bradley

On Fri, Dec 5, 2008 at 7:37 PM, Matthew Weier O'Phinney
<[EMAIL PROTECTED]> wrote:
> -- Bradley Holt <[EMAIL PROTECTED]> wrote
> (on Friday, 05 December 2008, 07:09 PM -0500):
>> I have a SubForm that and I'd like to set the content of its related dt. This
>> is the first part of what I'm currently getting:
>>
>>  ...
>>
>> What I want to do is replace the " " above with the word "Phones". It
>> appears that there is no setLabel on SubForms like there is on form elements.
>> There is a setLegend but that does not affect the dt, it only adds a legend
>> element:
>>
>>  Phones
>> ...
>>
>> My guess is that I need to get a reference to the DtDdWrapper decorator and 
>> set
>> an option on that. However, I'm not sure what option(s) I'd use:
>>
>> $phoneSubForm->getDecorator('DtDdWrapper')->setOption('?', 'Phones');
>>
>> Is this possible and if so am I going about it all wrong?
>
> The DtDdWrapper actually doesn't have an option for that. You have two
> options here.
>
> Short term, create your own drop-in substitute for DtDdWrapper, and push
> in this functionality. This is pretty trivial to achieve -- something
> like this:
>
>class My_Form_Decorator_DtDdWrapper extends Zend_Form_Decorator_DtDdWrapper
>{
>public function render($content)
>{
>$dt = $this->getOption('dt');
>if (null === $dt) {
>$dt = ' ';
>}
>        return '' . $dt . '' . $content . '';
>}
>}
>
> Long term, put an issue in the issue tracker to add support for
> providing the dt content.
>
> --
> Matthew Weier O'Phinney
> Software Architect   | [EMAIL PROTECTED]
> Zend Framework   | http://framework.zend.com/
>



-- 
Bradley Holt
[EMAIL PROTECTED]


[fw-general] Re: SubForm "Label"

2008-12-05 Thread Bradley Holt
OK, I answered my own question by searching through the mailing list
archive in my email. I'd link to it but I can't find it in Nabble for
some reason but it was a post by Amr Mostafa on Jun 7, 2008. I
extended Zend_Form_SubForm to create something like this:

class My_SubForm extends Zend_Form_SubForm
{
protected $_label;

public function setLabel($label)
{
$this->_label = $label;
return $this->_label;
}

public function getLabel()
{
return $this->_label;
}

public function isRequired()
{
return false;
}

public function loadDefaultDecorators()
{
parent::loadDefaultDecorators();
$this->removeDecorator('DtDdWrapper');
$this->addDecorator('Label', array('tag' => 'dt'));
}
}

Then, in my form code (since I've now got a setLabel method):

$phoneSubForm = new My_SubForm();
$phoneSubForm->setLabel('Phones');
$this->addSubForm($phoneSubForm, 'phone');

Which gets me (mostly) what I want:

Phones
...

This leaves me with a label that doesn't actually tie back to any form
element (hence, I'm guessing, the reason why the default
implementation of SubForm doesn't use label, but fieldset and "legend"
instead).

Thanks,
Bradley

On Fri, Dec 5, 2008 at 7:09 PM, Bradley Holt <[EMAIL PROTECTED]> wrote:
>
> I have a SubForm that and I'd like to set the content of its related dt. This 
> is the first part of what I'm currently getting:
>
>  ...
>
> What I want to do is replace the " " above with the word "Phones". It 
> appears that there is no setLabel on SubForms like there is on form elements. 
> There is a setLegend but that does not affect the dt, it only adds a legend 
> element:
>
>  Phones
> ...
>
> My guess is that I need to get a reference to the DtDdWrapper decorator and 
> set an option on that. However, I'm not sure what option(s) I'd use:
>
> $phoneSubForm->getDecorator('DtDdWrapper')->setOption('?', 'Phones');
>
> Is this possible and if so am I going about it all wrong?
>
> Thanks,
> Bradley
>
> --
> Bradley Holt
> [EMAIL PROTECTED]
>



--
Bradley Holt
[EMAIL PROTECTED]


[fw-general] SubForm "Label"

2008-12-05 Thread Bradley Holt
I have a SubForm that and I'd like to set the content of its related dt.
This is the first part of what I'm currently getting:

 ...

What I want to do is replace the " " above with the word "Phones". It
appears that there is no setLabel on SubForms like there is on form
elements. There is a setLegend but that does not affect the dt, it only adds
a legend element:

 Phones
...

My guess is that I need to get a reference to the DtDdWrapper decorator and
set an option on that. However, I'm not sure what option(s) I'd use:

$phoneSubForm->getDecorator('DtDdWrapper')->setOption('?',
'Phones');

Is this possible and if so am I going about it all wrong?

Thanks,
Bradley

-- 
Bradley Holt
[EMAIL PROTECTED]


Re: [fw-general] Developing for Zend Framework in Zend Studio for Eclipse

2008-11-03 Thread Bradley Holt
Good point Karol and Jonathan. I haven't upgraded from 6.0 yet. I will try
that and see if it makes a difference.

On Mon, Nov 3, 2008 at 4:23 AM, jkush1121 <[EMAIL PROTECTED]> wrote:

>
> Karol is correct. ZSE prior to 6.1 will not work correctly. Also, be sure
> to
> set your php inclusion paths.
>
> - Jonathan
>
>
> Themselves wrote:
> >
> > This is a very common issue with Eclipse, it dies in the arse with large
> > projects. The "building workspace" thing has cost me a handful of days in
> > lost productivity. I don't know any solutions, other than try to keep the
> > projects on your local machine (trying to work on a large project via ftp
> > mount or whatever is a guaranteed failure). Sorry I'm not much help here,
> > other than to let you know you're not alone. Actually, something that
> > might
> > help (if it's even possible) is turning off the way it parses the entire
> > project during that build process to find warnings - that seems to take
> > forever.
> >
> > On Mon, Nov 3, 2008 at 9:49 AM, Bradley Holt
> > <[EMAIL PROTECTED]>wrote:
> >
> >> Has anyone successfully used Zend Studio for Eclipse to develop for Zend
> >> Framework (I'm talking about developing Zend Framework itself, not web
> >> applications based on ZF)? I'm trying to use it to write some sample
> code
> >> for a proposed Zend Framework component and it is very slow and now has
> >> stopped for 30+ minutes (and still counting) to build my workspace
> >> blocking
> >> me from working. I'm wondering if I'm the only one experience these
> >> problems. If so, I'll pursue this in the appropriate support channels. I
> >> know Zend Framework is a big project, but I would think Zend Studio for
> >> Eclipse could handle it. I'm on a Windows XP Pro box with a 2.00 GHz
> >> processor and 2 GB of RAM. Do most Zend Framework developers use a
> >> different
> >> tool when writing their Zend Framework code? I know of at least one ZF
> >> developer who is a vi user ;-)
> >>
> >> Thanks,
> >> Bradley
> >>
> >> --
> >> Bradley Holt
> >> [EMAIL PROTECTED]
> >>
> >>
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Developing-for-Zend-Framework-in-Zend-Studio-for-Eclipse-tp20295748p20299480.html
> Sent from the Zend Framework mailing list archive at Nabble.com.
>
>


-- 
Bradley Holt
[EMAIL PROTECTED]


[fw-general] Developing for Zend Framework in Zend Studio for Eclipse

2008-11-02 Thread Bradley Holt
Has anyone successfully used Zend Studio for Eclipse to develop for Zend
Framework (I'm talking about developing Zend Framework itself, not web
applications based on ZF)? I'm trying to use it to write some sample code
for a proposed Zend Framework component and it is very slow and now has
stopped for 30+ minutes (and still counting) to build my workspace blocking
me from working. I'm wondering if I'm the only one experience these
problems. If so, I'll pursue this in the appropriate support channels. I
know Zend Framework is a big project, but I would think Zend Studio for
Eclipse could handle it. I'm on a Windows XP Pro box with a 2.00 GHz
processor and 2 GB of RAM. Do most Zend Framework developers use a different
tool when writing their Zend Framework code? I know of at least one ZF
developer who is a vi user ;-)

Thanks,
Bradley

-- 
Bradley Holt
[EMAIL PROTECTED]


Re: [fw-general] Truncate String

2008-10-28 Thread Bradley Holt
Matthew,

On Tue, Oct 28, 2008 at 3:27 PM, Matthew Weier O'Phinney
<[EMAIL PROTECTED]>wrote:

> -- Bradley Holt <[EMAIL PROTECTED]> wrote
> (on Tuesday, 28 October 2008, 02:28 PM -0400):
> > On Tue, Oct 28, 2008 at 1:12 PM, Matthew Weier O'Phinney <
> [EMAIL PROTECTED]>
> > wrote:
> >
> > -- Bradley Holt <[EMAIL PROTECTED]> wrote
> > (on Tuesday, 28 October 2008, 12:29 PM -0400):
> > > Is there a simple way in ZF to truncate a string? I searched and
> didn't
> > find
> > > any talk of a ZF specific component for this. I also looked at the
> list
> > of
> > > standard filter classes and didn't see anything there either. I
> know
> > there are
> > > tons of possible ways to do this - I'm just surprised there isn't
> > anything in
> > > ZF yet so perhaps I'm just not looking in the right place.
> >
> > You're looking for Zend_Filter_StringTrim -- which can be used in the
> > form classes as well.
> >
> >
> > Maybe I'm just slow today, but I'm not sure how Zend_Filter_StringTrim
> would be
> > used to truncate a string to a given character or word length. I thought
> it
> > simply removed given characters from the beginning and end of a string.
> >
> > For example, I want to truncate the following:
> >
> > The quick brown fox jumped over the lazy sleeping dog.
> >
> > to 30 characters:
> >
> > The quick brown fox jumped ove
> >
> > or to 30 characters, but the closest whole word:
> >
> > The quick brown fox jumped
> >
> > or to 6 words (instead of characters):
> >
> > The quick brown fox jumped over
> >
> > Of course, there are probably other features that may be useful too. Is
> this
> > something that can be done in Zend_Filter_StringTrim or using another ZF
> > component? There are numerous ways to do this in PHP directly (so no need
> for
> > anyone to post those here) but I was just curious if ZF had a clean and
> simple
> > way to do this.
>
> Oh, never mind -- I was thinking "truncate trailing whitespace", not
> "truncate to a given preset length".
>
> Nope, nothing like that currently. Sounds like a good feature request.
> :)


OK - that's what I thought. As you suggested, I've filed a feature request
as ZF-4734:
http://framework.zend.com/issues/browse/ZF-4734

Anyone else who would like to see this please go vote for it :-)

Thanks,
Bradley


>
> --
> Matthew Weier O'Phinney
> Software Architect   | [EMAIL PROTECTED]
> Zend Framework   | http://framework.zend.com/
>



-- 
Bradley Holt
[EMAIL PROTECTED]


Re: [fw-general] Truncate String

2008-10-28 Thread Bradley Holt
Matthew,

On Tue, Oct 28, 2008 at 1:12 PM, Matthew Weier O'Phinney
<[EMAIL PROTECTED]>wrote:

> -- Bradley Holt <[EMAIL PROTECTED]> wrote
> (on Tuesday, 28 October 2008, 12:29 PM -0400):
> > Is there a simple way in ZF to truncate a string? I searched and didn't
> find
> > any talk of a ZF specific component for this. I also looked at the list
> of
> > standard filter classes and didn't see anything there either. I know
> there are
> > tons of possible ways to do this - I'm just surprised there isn't
> anything in
> > ZF yet so perhaps I'm just not looking in the right place.
>
> You're looking for Zend_Filter_StringTrim -- which can be used in the
> form classes as well.


Maybe I'm just slow today, but I'm not sure how Zend_Filter_StringTrim would
be used to truncate a string to a given character or word length. I thought
it simply removed given characters from the beginning and end of a string.

For example, I want to truncate the following:

The quick brown fox jumped over the lazy sleeping dog.

to 30 characters:

The quick brown fox jumped ove

or to 30 characters, but the closest whole word:

The quick brown fox jumped

or to 6 words (instead of characters):

The quick brown fox jumped over

Of course, there are probably other features that may be useful too. Is this
something that can be done in Zend_Filter_StringTrim or using another ZF
component? There are numerous ways to do this in PHP directly (so no need
for anyone to post those here) but I was just curious if ZF had a clean and
simple way to do this.

Thanks,
Bradley



>
>
> --
> Matthew Weier O'Phinney
> Software Architect   | [EMAIL PROTECTED]
> Zend Framework   | http://framework.zend.com/
>



-- 
Bradley Holt
[EMAIL PROTECTED]


[fw-general] Truncate String

2008-10-28 Thread Bradley Holt
Is there a simple way in ZF to truncate a string? I searched and didn't find
any talk of a ZF specific component for this. I also looked at the list of
standard filter classes and didn't see anything there either. I know there
are tons of possible ways to do this - I'm just surprised there isn't
anything in ZF yet so perhaps I'm just not looking in the right place.

Thanks,
Bradley

-- 
Bradley Holt
[EMAIL PROTECTED]


Re: [fw-general] script that you can prerun on your hosting to see if all needed extensions are available

2008-10-13 Thread Bradley Holt
I actually did something like this recently. It was fairly trivial to setup,
but I'd be willing to contribute it to the framework if anyone is
interested. I sent this to a client to test and it was very helpful in
evaluating system requirements:
http://bradley-holt.blogspot.com/2008/09/im-currently-working-on-project-where.html

On Mon, Oct 13, 2008 at 8:23 PM, lupusBE <[EMAIL PROTECTED]> wrote:

>
> Maybe creating a php file that scans info like the one you get with
> phpinfo()
> and tells you what is needed to get things working would be handy for some
> people.
>
> You can then easily send a list (the one you get on the screen) to your
> providers support channel
>
> Could also be handy if you have made a project for a customer and you are
> not sure the hosting of the customer has everything that is needed for the
> project to run.
> You could then run this on the customers hosting or let the customer
> himself
> run it.
> You could use this also before upgrading a your library directory.
> if current version is 1.6 and you want to update to 1.7 but 1.7 has other
> requirements you could make the script scan if the hosting has the needed
> requirements.
>
> Drupal for example also does a check like this.
>
> http://framework.zend.com/issues/browse/ZF-4592
> --
> View this message in context:
> http://www.nabble.com/script-that-you-can-prerun-on-your-hosting-to-see-if-all-needed-extensions-are-available-tp19965228p19965228.html
> Sent from the Zend Framework mailing list archive at Nabble.com.
>
>


-- 
Bradley Holt
[EMAIL PROTECTED]


Re: [fw-general] Framework speed shotout -- question

2008-10-10 Thread Bradley Holt
On Fri, Oct 10, 2008 at 9:21 AM, monk.e.boy <[EMAIL PROTECTED]>wrote:

>
>
>
> Isaak Malik-3 wrote:
> >
> > Firstly, you should know that they probably included the whole ZFW
> package
> > in a script and benchmarked it, this is to make a general estimate of the
> > framework's performance and should not be trusted for production use. Did
> > you ever see a professional include the whole ZFW in their bootstrap?
> > Well,
> > I have neither.
> >
>
>
> Care to elaborate or point us losers at a tutorial on how to 'not include
> the whole ZFW package in the bootstrap' please?! :-)


I believe he just meant having a bunch of "require_once" statements in your
bootstrap for every ZF component. This would be a very silly thing to do in
a real application. You should only require the components you're going to
need and I highly doubt there are any applications that need every ZF
component.

As a better alternative, I would suggest simply using the autoloader and let
it bring in your ZF components as you need them:
http://framework.zend.com/manual/en/zend.loader.html#zend.loader.load.autoload


>
>
> monk.e.boy
> --
> View this message in context:
> http://www.nabble.com/Framework-speed-shotoutquestion-tp19914787p19918225.html
> Sent from the Zend Framework mailing list archive at Nabble.com.
>
>


-- 
Bradley Holt
[EMAIL PROTECTED]


Re: [fw-general] any generators out there ?

2008-10-09 Thread Bradley Holt
http://framework.zend.com/wiki/display/ZFPROP/Zend_Tool+-+General

On Thu, Oct 9, 2008 at 6:28 PM, Jan Kohlhof
<[EMAIL PROTECTED]>wrote:

> Hi there,
>
> just some idea that came up today. I hate writing the same things all
> over again, so i just wonder if there are any plans to include
> generators like in RoR or symfony to help one develop a little more
> agile. Maybe there is already something ?
>
> something like
> generate init  which sets up a project with default directories
> or
> generate add   ,,
> and so on
> that you can use on cli.
>
> best regards
> Jan
>
>


-- 
Bradley Holt
[EMAIL PROTECTED]


Re: [fw-general] W3C Markup Validation

2008-10-01 Thread Bradley Holt
After I sent my response last night, I was thinking more about the fact that
the HTTP_REFERER is technically a form of user input since it's sent by the
user's browser (in my understanding). For this reason, it should probably be
filtered before used anywhere in the application to prevent SQL injection
(not relevant in this example) or XSS. I can't think of a scenario where an
XSS vulnerability could actually occurr using the HTTP_REFERER, but the fact
remains that it's user input and should not be trusted because it can be
tampered with. I'm not sure exactly what filter should be used, but
something that makes sure it contains only a valid URL.

On Tue, Sep 30, 2008 at 11:02 PM, Matthew Weier O'Phinney
<[EMAIL PROTECTED]>wrote:

> -- Matthew Ishii <[EMAIL PROTECTED]> wrote
> (on Tuesday, 30 September 2008, 07:13 PM -0700):
> > I am not sure if this has been brought up before (though most likely
> > it has) however I will anyway, I am having issues validating my pages
> > against the W3C webstandards for proper HTML markup.  I am using the
> > XHTML1_STRICT Doctype.
> >
> > It seems like the phtml webpage format is having difficulties working
> > with the standards, for example, I have a 'back' link that is using
> > the SERVER 'HTTP_REFERER' variable to direct users to the last visited
> > page.  When I attempt to validate the page with the following markup,
> > I receive the following errors:
> >
> > Markup -
> >
> > Back
> >
> > Error(s) -
> >
> > Line 92, Column 37: character "<" is the first character of a
> > delimiter but occurred as data.
> >
> > Warning  Line 93, Column 9: character "<" is the first character of a
> > delimiter but occurred as data.
> >
> > Notice:  Undefined index:  HTTP_REFERER in
> /home1/ioforgec/zend/applic
> >
> > What I find strange is the notice, that the validation service catches
> > in the source, but when viewed by me in the browser and when viewed in
> > the post-rendered source I dont see such a notice.  I suppose the
> > HTTP_REFERER is not set for a robotic user, which is what the
> > validation service must be manifesting as to my application.  But how
> > can I prevent this from causing the page not to validate?
>
> A couple things I see here. First, what are you validating? the .phtml
> file itself, or a page that renders that view script? Second, yes,
> HTTP_REFERER is something that may or may not be present based on the
> current request environment
>
> I'd suggest creating a view helper that generates the backlink; you
> could then add some logic in the helper to check for the existence of
> the key, and if not present, simply emit an empty string or an anchor.
> It might look like this:
>
>class My_View_Helper_BackLink extends Zend_View_Helper_Abstract
>{
>public function backLink()
>{
>    $link = '#';
>if (array_key_exists('HTTP_REFERER', $_SERVER)) {
>$link = $_SERVER['HTTP_REFERER'];
>}
>return 'Back';
>}
>}
>
> --
> Matthew Weier O'Phinney
> Software Architect   | [EMAIL PROTECTED]
> Zend Framework   | http://framework.zend.com/
>



-- 
Bradley Holt
[EMAIL PROTECTED]


Re: [fw-general] W3C Markup Validation

2008-09-30 Thread Bradley Holt
The HTTP_REFERER is sent by the client as part of the request, so there is
no guarantee that it will be available (it's a form of user input and can't
be trusted). You should first check to make sure that it is set before
trying to echo it (a simple if statement would handle this).

On Tue, Sep 30, 2008 at 10:13 PM, Matthew Ishii <[EMAIL PROTECTED]>wrote:

> Hello all,
>
> I am not sure if this has been brought up before (though most likely
> it has) however I will anyway, I am having issues validating my pages
> against the W3C webstandards for proper HTML markup.  I am using the
> XHTML1_STRICT Doctype.
>
> It seems like the phtml webpage format is having difficulties working
> with the standards, for example, I have a 'back' link that is using
> the SERVER 'HTTP_REFERER' variable to direct users to the last visited
> page.  When I attempt to validate the page with the following markup,
> I receive the following errors:
>
> Markup -
>
> Back
>
> Error(s) -
>
> Line 92, Column 37: character "<" is the first character of a
> delimiter but occurred as data.
>
> Warning  Line 93, Column 9: character "<" is the first character of a
> delimiter but occurred as data.
>
> Notice:  Undefined index:  HTTP_REFERER in
> /home1/ioforgec/zend/applic
>
> What I find strange is the notice, that the validation service catches
> in the source, but when viewed by me in the browser and when viewed in
> the post-rendered source I dont see such a notice.  I suppose the
> HTTP_REFERER is not set for a robotic user, which is what the
> validation service must be manifesting as to my application.  But how
> can I prevent this from causing the page not to validate?
>
> If anyone would like to take a look at all the errors, just simply
> visit this link:
>
> http://validator.w3.org/check?uri=http%3A%2F%2Fwww.ioforge.com%2Fservices%2Fclientservices&charset=(detect+automatically)&doctype=Inline&group=0&user-agent=W3C_Validator%2F1.591<http://validator.w3.org/check?uri=http%3A%2F%2Fwww.ioforge.com%2Fservices%2Fclientservices&charset=%28detect+automatically%29&doctype=Inline&group=0&user-agent=W3C_Validator%2F1.591>
>
> Bottom line is I suppose it doesnt matter whether I validate or not,
> so dont think im hung up on it, but it should, I think.  And I would
> like to ..
>
> Anyway, I appreciate anyone's suggestions or insight into this matter.
>
> Thanks, Matthew Ishii
>



-- 
Bradley Holt
[EMAIL PROTECTED]


Re: [fw-general] Zend_Db specify character set

2008-09-30 Thread Bradley Holt
Sorry, should have explained it a little more :-)

I just run that query once before the first "real" query, something like
this:

$dbAdapter->query('SET NAMES UTF8');

After running that once, you should be good for the rest of the connection.
In web applications where pretty every controller/action will need a
database connection I just do it right after I initialize the DB adapter:

$dbAdapter = Zend_Db::factory($this->_config->database));
$dbAdapter->query('SET NAMES UTF8');
Zend_Registry::getInstance()->dbAdapter = $dbAdapter;

Of course, this would open up an unnecessary database connection for
controllers/actions that don't need database connections. I don't have a
good answer for you on that - but basically you'd have to only run that
query when you know you'll need a database connection.

If anyone has a better way of doing this, I'd love to hear about it!

Thanks,
Bradley

On Tue, Sep 30, 2008 at 5:07 PM, Rob Riggen <[EMAIL PROTECTED]> wrote:

> Surely you don't do that on every call?
>
> I'm using Zend_Db_Table so I'm not necessarily writing queries - where
> can/should this be done?
>
> Thanks!
>
> Rob
>
>
> On Tue, Sep 30, 2008 at 5:04 PM, Bradley Holt <[EMAIL PROTECTED]>wrote:
>
>> Hi Rob - I usually do this by issuing a 'SET NAMES UTF8' query.
>>
>>
>> On Tue, Sep 30, 2008 at 4:59 PM, Rob Riggen <[EMAIL PROTECTED]>wrote:
>>
>>> Is there a way to force the character set on mysql db connections to
>>> UTF-8?
>>>
>>> Thanks,
>>>
>>> Rob
>>>
>>> *Robert Riggen* - Zend Certified Engineer
>>> *Big Yellow Technologies, LLC*
>>>
>>> Essex Junction, VT 05452
>>> 802.578.6719
>>> [EMAIL PROTECTED]
>>>
>>>
>>
>>
>> --
>> Bradley Holt
>> [EMAIL PROTECTED]
>>
>>
>


-- 
Bradley Holt
[EMAIL PROTECTED]


Re: [fw-general] Zend_Db specify character set

2008-09-30 Thread Bradley Holt
Hi Rob - I usually do this by issuing a 'SET NAMES UTF8' query.

On Tue, Sep 30, 2008 at 4:59 PM, Rob Riggen <[EMAIL PROTECTED]> wrote:

> Is there a way to force the character set on mysql db connections to UTF-8?
>
> Thanks,
>
> Rob
>
> *Robert Riggen* - Zend Certified Engineer
> *Big Yellow Technologies, LLC*
>
> Essex Junction, VT 05452
> 802.578.6719
> [EMAIL PROTECTED]
>
>


-- 
Bradley Holt
[EMAIL PROTECTED]


Re: [fw-general] Smarty Poll Question

2008-09-24 Thread Bradley Holt
Garrison,

Good to see you on the list (we met at ZendCon)! I used to use Smarty but
stopped using it a couple of years ago. The main reason I used Smarty was to
separate display and business logic. Zend Framework's MVC components provide
the separation I need and make it so there is no reason for me to use
Smarty. I like the simplicity of using PHP as a templating language in the
view - after all, PHP has historically been used for creating dynamic HTML
content, why reinvent the wheel? On a side note, I have been experimenting
with using HTML microformats as a templating language (see
plainTemplate<http://ajaxian.com/archives/plaintemplate-phpquery>for
an example), but that's a discussion for another day.

Thanks,
Bradley

On Wed, Sep 24, 2008 at 2:58 PM, Garrison Locke <[EMAIL PROTECTED]>wrote:

> I know this usually starts a big war, but I was just curious about how
> many people out there are using Smarty and to what extent you're using it?
>  If you're not using it, why did you decide to not use it?  If you are,
> why?  Also, if you're using it, how big or small are the projects?  Just
> personal things or like giant things with tens of thousands of users.
>
> Thanks!
>
> Garrison
>
>
> --
> Garrison Locke
> Lead Dynamic Functionality Specialist
> OIT - Outreach Technology
> NC State University
> [EMAIL PROTECTED]
>



-- 
Bradley Holt
[EMAIL PROTECTED]


Re: [fw-general] ZF and ZendCon 08

2008-09-10 Thread Bradley Holt
No issue - just starting my heckling early ;-)

On Wed, Sep 10, 2008 at 6:27 AM, Wil Sinclair <[EMAIL PROTECTED]> wrote:

>  Silly me, I forgot my disclaimers. ;) This offer cannot be combined with
> any other discount for the Zend Conference, including the early bird
> discount. If you still have an issue, contact me directly.
>
>
>
> ,Wil
>
>
>
> *From:* Bradley Holt [mailto:[EMAIL PROTECTED]
> *Sent:* Tuesday, September 09, 2008 4:37 PM
> *To:* Wil Sinclair
> *Cc:* fw-general@lists.zend.com
> *Subject:* Re: [fw-general] ZF and ZendCon 08
>
>
>
> What if we've already registered? :-)
>
> On Tue, Sep 9, 2008 at 7:22 PM, Wil Sinclair <[EMAIL PROTECTED]> wrote:
>
> Hi all, as some of you are probably aware, Zend holds an annual
> conference for PHP developers: http://www.zendcon.com. It's a great mix
> of fun and education, and there is are many presentations on Zend
> Framework. You'll find several of these presentations here:
> http://www.zendcon.com/ZendCon08/public/schedule/topic/Zend+Framework.
> Now I would love to see Zend Framework contributors and users come out
> in hordes, so I talked to the powers that be about a special deal for ZF
> mailing list subscribers. So here's what I got for you:
>
>
> In celebration of the ZF 1.6 launch, we would like to extend a special
> $200 discount to you.  To take advantage of this discount, please
> register with discount code: YDSC8.
>
>
> Matthew will be doing a tutorial before the conference that IMO you'd be
> crazy to miss. I know it's a bit late, but there are still flights to be
> booked and hotel rooms to be reserved. I hope to see you there!
>
> ,Wil
>
>
>
>
> --
> Bradley Holt
> [EMAIL PROTECTED]
>



-- 
Bradley Holt
[EMAIL PROTECTED]


Re: [fw-general] ZF and ZendCon 08

2008-09-09 Thread Bradley Holt
What if we've already registered? :-)

On Tue, Sep 9, 2008 at 7:22 PM, Wil Sinclair <[EMAIL PROTECTED]> wrote:

> Hi all, as some of you are probably aware, Zend holds an annual
> conference for PHP developers: http://www.zendcon.com. It's a great mix
> of fun and education, and there is are many presentations on Zend
> Framework. You'll find several of these presentations here:
> http://www.zendcon.com/ZendCon08/public/schedule/topic/Zend+Framework.
> Now I would love to see Zend Framework contributors and users come out
> in hordes, so I talked to the powers that be about a special deal for ZF
> mailing list subscribers. So here's what I got for you:
>
>
> In celebration of the ZF 1.6 launch, we would like to extend a special
> $200 discount to you.  To take advantage of this discount, please
> register with discount code: YDSC8.
>
>
> Matthew will be doing a tutorial before the conference that IMO you'd be
> crazy to miss. I know it's a bit late, but there are still flights to be
> booked and hotel rooms to be reserved. I hope to see you there!
>
> ,Wil
>



-- 
Bradley Holt
[EMAIL PROTECTED]


Re: [fw-general] Dash in Zend_Form_Element Name

2008-09-08 Thread Bradley Holt
Matthew,

Great - thanks for the help!

On Sun, Sep 7, 2008 at 9:44 PM, Matthew Weier O'Phinney <[EMAIL 
PROTECTED]>wrote:

> -- Bradley Holt <[EMAIL PROTECTED]> wrote
> (on Sunday, 07 September 2008, 08:35 PM -0400):
> > It appears that dash characters are not allowed in Zend_Form_Element
> names. For
> > example, I create the following element:
> >
> > $someParameterElement = new Zend_Form_Element_Text('some-parameter');
> >
> > When I render the form that the element is in I lose the dashes:
> >
> > 
> >
> > What I had hoped for was:
> >
> > 
> >
> > Trying to set the name attribute doesn't help either:
> >
> > $someParameterElement->setAttrib('name', 'some-parameter');
> >
> > I'm using inflection to get these parameters into a database so the dash
> > character is important. I could use underscores (or some other separator
> that
> > is allowed) but dashes seem to be the convention in Zend Framework for
> word
> > separators in parameters and I was trying to stick to that convention
> (also, we
> > use dash-separated-words for CSS selectors so the name would be
> inconsistent
> > with the id). This would create inconsistencies in how a deal with
> parameters
> > in the application. For example, say I have the following URL for
> retrieving
> > data based on the some-parameter parameter:
> >
> >
> http://www.example.org/some-controller/some-action/some-parameter/some-value/
> >
> > Here I'm following Zend Framework's dash-word-separator convention for
> the
> > parameter name. This would mean I'd have to inflect the parameter names
> > differently depending on whether I'm reading (dashes) or
> inserting/updating
> > (underscores) data.
>
> Element names must be valid PHP variable names, plain and simple. This was
> to allow referring naming variables after the element names as well as
> to allow overloading to retrieve elements from a form. Additionally,
> doing so ensures that the names will work with most configuration
> formats.
>
> You can override this behavior by extending Zend_Form; remove the
> overloading and override setName() to do it.
>
> > Alternatively I could break the dash-separator convention and simply
> > go with:
> >
> >
> http://www.example.org/some-controller/some-action/some_parameter/some-value/
> >
> > This would allow me to use the parameter name inflection consistently but
> I'd
> > really like to stick with dashes for several reasons - convention, SEO,
> plus I
> > think they look better ;-)
> >
> > Given the choice, I'll probably just inflect the parameter names
> differently
> > based on whether I'm reading or inserting/updating rather than lose my
> pretty
> > URLs. Am I just missing how to do this or does Zend_Form not allow it?
>
> --
> Matthew Weier O'Phinney
> Software Architect   | [EMAIL PROTECTED]
> Zend Framework   | http://framework.zend.com/
>



-- 
Bradley Holt
[EMAIL PROTECTED]


[fw-general] Dash in Zend_Form_Element Name

2008-09-07 Thread Bradley Holt
It appears that dash characters are not allowed in Zend_Form_Element names.
For example, I create the following element:

$someParameterElement = new Zend_Form_Element_Text('some-parameter');

When I render the form that the element is in I lose the dashes:



What I had hoped for was:



Trying to set the name attribute doesn't help either:

$someParameterElement->setAttrib('name', 'some-parameter');

I'm using inflection to get these parameters into a database so the dash
character is important. I could use underscores (or some other separator
that is allowed) but dashes seem to be the convention in Zend Framework for
word separators in parameters and I was trying to stick to that convention
(also, we use dash-separated-words for CSS selectors so the name would be
inconsistent with the id). This would create inconsistencies in how a deal
with parameters in the application. For example, say I have the following
URL for retrieving data based on the some-parameter parameter:

http://www.example.org/some-controller/some-action/some-parameter/some-value/

Here I'm following Zend Framework's dash-word-separator convention for the
parameter name. This would mean I'd have to inflect the parameter names
differently depending on whether I'm reading (dashes) or inserting/updating
(underscores) data. Alternatively I could break the dash-separator
convention and simply go with:

http://www.example.org/some-controller/some-action/some_parameter/some-value/

This would allow me to use the parameter name inflection consistently but
I'd really like to stick with dashes for several reasons - convention, SEO,
plus I think they look better ;-)

Given the choice, I'll probably just inflect the parameter names differently
based on whether I'm reading or inserting/updating rather than lose my
pretty URLs. Am I just missing how to do this or does Zend_Form not allow
it?

Thanks,
Bradley

-- 
Bradley Holt
[EMAIL PROTECTED]


Re: [fw-general] What is your Zend workflow?

2008-08-28 Thread Bradley Holt
Kevin,

On Thu, Aug 28, 2008 at 1:06 PM, ripcurlksm <[EMAIL PROTECTED]> wrote:

>
> What do you use to start your Zend projects? Eclipse?


I use Zend Studio for Eclipse but I don't create it as a Zend Framework
project - I create the file system layout myself. I first create an empty
trunk in Subversion then "import" from there before I build out my project.


>
> What resources were critical when learning Zend?


The Programmer's Reference Guide <http://framework.zend.com/manual/en/> - I
read it beginning to end. Awesome job on the documentation guys, seriously!
The API Documentation <http://framework.zend.com/apidoc/core/> is useful
from time-to-time but I usually just find myself looking in the ZF code
itself instead. The code completion features of Zend Studio are helpful in
learning as well (which is really just using the API docs).


>
>
> Regards,
> Kevin
> --
> View this message in context:
> http://www.nabble.com/What-is-your-Zend-workflow--tp19204909p19204909.html
> Sent from the Zend Framework mailing list archive at Nabble.com.
>
>


-- 
Bradley Holt
[EMAIL PROTECTED]


Re: [fw-general] OT: Good Docbook Editor

2008-07-31 Thread Bradley Holt
Simon,

That's exactly what I was wondering - if XXE played well with the current ZF
doc setup (apparently it doesn't). I've only used it for documentation that
I created (but I have kept a close eye on the XML output and have been happy
with what I've seen). For non-programmers (or people who don't want to
hand-edit XML) its a really nice tool. We've been using it for
non-programmers to generate XHTML content since it focuses on structure (
WYSIWYM <http://en.wikipedia.org/wiki/WYSIWYM>), not presentation (WYSIWYG).
Too bad it doesn't play well with the ZF docs :-)

Thanks,
Bradley

On Thu, Jul 31, 2008 at 5:27 PM, Simon Mundy <[EMAIL PROTECTED]>wrote:

> Hi Brad,
> FWIW I began using XMLMind to create and update entries in the ZF
> documentation.
>
> It had a tendency to mash existing code examples (e.g. converting all < to
> < and removing CDATA instructions) and muck around with every single line
> re: whitespace. In turn this meant the documentation guys had real trouble
> determining what had been changed, as the change logs showed that every line
> was updated, thus drawing out the process.
>
> As an editor it's brilliant - I use it a lot for other projects. Maybe the
> paid-for version allows more fine-grained control over the output, but for
> now I'll stick with hand-coding when it comes to ZF updates.
>
> Cheers
>
>
> Matt,
>
> Sorry about continuing an OT discussion, but I'm curious what you mean when
> you say the XML from XMLmind XML Editor (XXE) wasn't "good enough?" My
> experience with XXE has been that the XML was perfectly valid, well
> formatted in respect to whitespace, and met the DocBook specs. I find it
> surprising that it's quicker for you to copy-and-paste from Microsoft Word
> than it is to just use a structured content editing tool like XXE from the
> beginning. In my understanding, the whole point of structured content is
> that you're considering both content and structure at the same time.
>
> On Thu, Jul 31, 2008 at 2:39 PM, Matthew Ratzloff <
> [EMAIL PROTECTED]> wrote:
>
>> Microsoft Word, and then translated into DocBook by hand.  This is the
>> quickest way for me that I've found.  The first part I worry about the
>> content.  Only then do I worry about the semantics and formatting.
>> I tried using XMLmind's editor once for client documentation at work.  I
>> dumped it.  The XML it produces just wasn't good enough.
>>
>> -Matt
>>
>>
>> On Thu, Jul 31, 2008 at 6:41 AM, Keith Pope <[EMAIL PROTECTED]>wrote:
>>
>>> Hey guys,
>>>
>>> Do you use a docbook editor for writing the zf docs? If so whats a good
>>> editor to use?
>>>
>>> Thx
>>>
>>> Keith Pope
>>>
>>> --
>>> allpay.net Limited, Fortis et Fides, Whitestone Business Park,
>>> Whitestone, Hereford, HR1 3SE. Registered in England No. 02933191. UK VAT
>>> Reg. No. 666 9148 88.
>>>
>>> Telephone: 0870 243 3434, Fax: 0870 243 6041.
>>> Website: www.allpay.net Email: [EMAIL PROTECTED]
>>>
>>> This email, and any files transmitted with it, is confidential and
>>> intended solely for the use of the individual or entity to whom it is
>>> addressed. If you have received this email in error please notify the
>>> allpay.net Information Security Manager at the number above.
>>>
>>>
>>
>
>
> --
> Bradley Holt
> [EMAIL PROTECTED]
>
>
> --
>
> Simon Mundy | Director | PEPTOLAB
>
> """ " "" """""" "" "" """"""" " "" """"" " """"" "  """""" "" "
>
> 202/258 Flinders Lane | Melbourne | Victoria | Australia | 3000
> Voice +61 (0) 3 9654 4324 | Mobile 0438 046 061 | Fax +61 (0) 3 9654 4124
> http://www.peptolab.com
>
>


-- 
Bradley Holt
[EMAIL PROTECTED]


Re: [fw-general] OT: Good Docbook Editor

2008-07-31 Thread Bradley Holt
Matt,

Sorry about continuing an OT discussion, but I'm curious what you mean when
you say the XML from XMLmind XML Editor (XXE) wasn't "good enough?" My
experience with XXE has been that the XML was perfectly valid, well
formatted in respect to whitespace, and met the DocBook specs. I find it
surprising that it's quicker for you to copy-and-paste from Microsoft Word
than it is to just use a structured content editing tool like XXE from the
beginning. In my understanding, the whole point of structured content is
that you're considering both content and structure at the same time.

On Thu, Jul 31, 2008 at 2:39 PM, Matthew Ratzloff
<[EMAIL PROTECTED]>wrote:

> Microsoft Word, and then translated into DocBook by hand.  This is the
> quickest way for me that I've found.  The first part I worry about the
> content.  Only then do I worry about the semantics and formatting.
> I tried using XMLmind's editor once for client documentation at work.  I
> dumped it.  The XML it produces just wasn't good enough.
>
> -Matt
>
>
> On Thu, Jul 31, 2008 at 6:41 AM, Keith Pope <[EMAIL PROTECTED]> wrote:
>
>> Hey guys,
>>
>> Do you use a docbook editor for writing the zf docs? If so whats a good
>> editor to use?
>>
>> Thx
>>
>> Keith Pope
>>
>> --
>> allpay.net Limited, Fortis et Fides, Whitestone Business Park,
>> Whitestone, Hereford, HR1 3SE. Registered in England No. 02933191. UK VAT
>> Reg. No. 666 9148 88.
>>
>> Telephone: 0870 243 3434, Fax: 0870 243 6041.
>> Website: www.allpay.net Email: [EMAIL PROTECTED]
>>
>> This email, and any files transmitted with it, is confidential and
>> intended solely for the use of the individual or entity to whom it is
>> addressed. If you have received this email in error please notify the
>> allpay.net Information Security Manager at the number above.
>>
>>
>


-- 
Bradley Holt
[EMAIL PROTECTED]


Re: [fw-general] OT: Good Docbook Editor

2008-07-31 Thread Bradley Holt
Keith,

I haven't used it for ZF docs, but XMLmind XML
Editor<http://www.xmlmind.com/xmleditor/>(XXE) makes a really nice
DocBook editor. I don't know how well it plays
with the specific format used for ZF docs, though. Has anyone tried it on
the ZF docs?

On Thu, Jul 31, 2008 at 9:41 AM, Keith Pope <[EMAIL PROTECTED]> wrote:

> Hey guys,
>
> Do you use a docbook editor for writing the zf docs? If so whats a good
> editor to use?
>
> Thx
>
> Keith Pope
>
> --
> allpay.net Limited, Fortis et Fides, Whitestone Business Park, Whitestone,
> Hereford, HR1 3SE. Registered in England No. 02933191. UK VAT Reg. No. 666
> 9148 88.
>
> Telephone: 0870 243 3434, Fax: 0870 243 6041.
> Website: www.allpay.net Email: [EMAIL PROTECTED]
>
> This email, and any files transmitted with it, is confidential and intended
> solely for the use of the individual or entity to whom it is addressed. If
> you have received this email in error please notify the allpay.netInformation 
> Security Manager at the number above.
>
>


-- 
Bradley Holt
[EMAIL PROTECTED]


Re: [fw-general] Wysiwyg pages with Zend_form

2008-06-25 Thread Bradley Holt
I haven't tried it yet, but I'd recommend taking a look at
WYMeditor<http://www.wymeditor.org/>.
It's WYSIWYM (What You See Is What You Mean) instead of WYSIWYG.

On Wed, Jun 25, 2008 at 3:03 PM, Lior Messinger <[EMAIL PROTECTED]>
wrote:

>
> Hi all
>
> i'm new at ZF, and would like to use it since I've heard great things. But,
> i'm a little at awe on how should i design a web form, Wysiwyg style.
>
> From the many posts and documentation, it seems that I need to put all the
> html code and tags as decorators. Could that be? It would make it really
> complex to design and maintain.
>
> Alternatively, I thought of is building the page in dreamweaver, changing
> it
> to phtml, and then enclose form elements as   $this->form->getValue('firstName'); ?> or  $this->form->getElement('firstName'); ?> (for the edit boxes). would that
> work?
>
> Is there another option? Any Wysiwyg Zend-supporting editors?
>
> thanks SO MUCH for ANY idea
> Lior
> --
> View this message in context:
> http://www.nabble.com/Wysiwyg-pages-with-Zend_form-tp18119647p18119647.html
> Sent from the Zend Framework mailing list archive at Nabble.com.
>
>


-- 
Bradley Holt
[EMAIL PROTECTED]


Re: [fw-general] New Wiki Application under development (ZFWiki) using ZendFramewo rk 1.5.0

2008-06-19 Thread Bradley Holt
Robert,

Hurry up and create a mailing list so people like me don't pollute the ZF
mailing list with ZfWiki traffic! (that's my way of apologizing in advance
for my off-topic post) ;-)

Interesting project, I wish you the best with it. I've poked through your
svn repository and I have some suggestions for you.

   - config.ini should be in svn as config.dist.ini and config.ini should be
   added to svn:ignore - only the template configuration should be versioned,
   not a specific configuration file that could change from install to install
   - I'd suggest following the Zend Framework PHP Coding Standard.
   Specifically, use DocBlock style comments including the appropriate tags.
   - I'd suggest namespacing your models. For example, Pages could become
   Zfwiki_Db_Table_Pages or just Db_Table_Pages if you prefer. Also, why are
   some models under application/models and others in library? I would think
   you'd want one or the other unless you're truly bringing in whole other
   library.
   - Be sure to set svn:eol-style to native on PHP and other text-oriented
   files to avoid issues with multiple developers working on the project on
   different OS platforms.
   - Keep a separate SQL install script rather than having the SQL for a
   particular table commented in that table's class. Also, it looks like you
   have a binary SQLite database stored in svn - I'd suggest using SQL DDL to
   script the creation of these tables rather than storing them raw in svn.
   That's a lot easier to manage as changes are made over time.
   - I'd suggest enforcing GET or POST requests methods rather than just
   pulling the parameter regardless of request method. This is especially
   important with things like saveAction() - you definitely want that to only
   work on POST.
   - I'd suggest using Zend_Layout instead of rendering header and footer in
   your view scripts. Also, I like to keep my partial view scripts fully
   self-contained meaning that every HTML element needs to start and end in the
   same view script. Once you start having the start HTML element in one place
   and the closing element in another you're opening yourself up to some
   maintenance nightmares.
   - Why are .htacces, css, js, and images at the top-level? Shouldn't those
   be in a "public" or "htdocs" directory (or equivalent)?

Hope these comments are helpful! Let me know if you want me to clarify any
of these.

On Thu, Jun 19, 2008 at 4:41 PM, Robert Castley <[EMAIL PROTECTED]>
wrote:

>  Hi All,
>
> I am re-instated my interest in developing a Wiki using Zend Framework.
> The fruits of the last twenty-four hours are now available.
>
> I am hosting the project over at GoogleCode:
> http://code.google.com/p/zfwiki/
>
> The Wiki uses the same wiki syntax (almost) as Confluence.  The content is
> called and displayed using AJAX via. ProtoType.
>
> This project is NOT stable and should NOT be used for production.  It is
> VERY experimental and is probably full of holes, bugs and XSS.
>
> Please download, have a play, feedback, suggest etc.  even better if you
> fancy joining in and helping out then drop me line.
>
> Over the next week or so I plan to add/integrate:
>
> - Zend_Auth
> - Zend_Acl
> - Zend_Search
> - domPDF
>
> All the best,
>
> - Robert
>
>
> 
> This email has been scanned for all known viruses by the MessageLabs Email
> Security Service and the Macro 4 plc internal virus protection system.
> 
>



-- 
Bradley Holt
[EMAIL PROTECTED]


Re: [fw-general] Exploding Data Centers

2008-06-06 Thread Bradley Holt
Steven,

I had noticed the quality seeming to decline as well. However, this
particular incident looks like it was really just bad luck. I would be
careful about blaming ThePlanet before there's more info about exactly what
caused the incident and what they could have done (if anything) to prevent
it.

On Fri, Jun 6, 2008 at 3:42 AM, Steven <[EMAIL PROTECTED]> wrote:

> Aye, I worked for an organization that used ThePlanet several years ago.
>  Ended up moving all our business to another host because of the many
> problems plaguing ThePlanet.  I guess they still haven't made any
> improvements.
>
>
> Terre Porter wrote:
>
>> Well that explains why the URL injection attacks have slowed down.
>>
>> ThePlanet = The unsecure hacker spammer infested hosting company (imo)
>>
>> Terre
>>
>> -Original Message-
>> From: Wil Sinclair [mailto:[EMAIL PROTECTED] Sent: Monday, June 02, 2008 6:33
>> PM
>> To: Zend Framework General
>> Subject: [fw-general] Exploding Data Centers
>>
>> Hi all, in case you were wondering why the list traffic seemed
>> particularly
>> light in the past few days, we were a victim of the EV1 exploding data
>> center:
>> http://forums.theplanet.com/index.php?showtopic=90185. Things should be
>> working more or less now, but please bear with us if you experience any
>> strange behavior from the lists in the next few days as they get their
>> routers and DNS's back up.
>> Now for the good news: It was precisely this data center that Matthew and
>> I
>> spent so much time moving out of last month. :) In short, this could have
>> been *much* worse.
>>
>> ,Wil
>>
>>
>>


-- 
Bradley Holt
[EMAIL PROTECTED]


Re: [fw-general] Exploding Data Centers

2008-06-02 Thread Bradley Holt
Yikes, I guess it could have been worse! I was wondering why the list
traffic was so light. We recently migrated all of our clients' hosting
accounts from The Planet (we actually started with EV1 then they got bought
by The Planet) to Mosso <http://www.mosso.com/>. I'm pretty sure our server
was in that data center as well. I'm glad we moved as well ;-)

On Mon, Jun 2, 2008 at 6:32 PM, Wil Sinclair <[EMAIL PROTECTED]> wrote:

> Hi all, in case you were wondering why the list traffic seemed
> particularly light in the past few days, we were a victim of the EV1
> exploding data center:
> http://forums.theplanet.com/index.php?showtopic=90185. Things should be
> working more or less now, but please bear with us if you experience any
> strange behavior from the lists in the next few days as they get their
> routers and DNS's back up.
> Now for the good news: It was precisely this data center that Matthew
> and I spent so much time moving out of last month. :) In short, this
> could have been *much* worse.
>
> ,Wil
>



-- 
Bradley Holt
[EMAIL PROTECTED]


Re: [fw-general] layout content not rendering

2008-05-28 Thread Bradley Holt
Matthew,

On Wed, May 28, 2008 at 4:34 PM, Matthew Weier O'Phinney <[EMAIL PROTECTED]>
wrote:

> -- Bradley Holt <[EMAIL PROTECTED]> wrote
> (on Wednesday, 28 May 2008, 11:25 AM -0400):
> > On Wed, May 28, 2008 at 11:06 AM, Greg Donald <[EMAIL PROTECTED]> wrote:
> >
> > On 5/28/08, Bradley Holt <[EMAIL PROTECTED]> wrote:
> > > This all looks correct except for one thing. I know the example in
> the
> > > documentation uses all uppercase 'CONTENT' but it also says:
> > >
> > > "contentKey: the layout variable used for default content (when
> used with
> > > the MVC). Default value is 'content'. Accessors are setContentKey()
> and
> > > getContentKey()."
> >
> > That was the problem.
> >
> >
> > Interesting, so it appears that the content key is case sensitive (based
> on
> > your experience). In that case, the documentation should probably be
> updated to
> > change the uppercase 'CONTENT' to lowercase 'content' and perhaps
> indicate that
> > the key is case sensitive. Does someone want to file a bug report? :-)
>
> Be my guest, Bradley. :-)


>From what Greg says it sounds like it is an issue - but I'd rather take the
time to confirm that I can reproduce the issue myself before filing a bug
report ;-)

If someone else gets to this before I do, please let me know. Thanks!


>
>
> --
> Matthew Weier O'Phinney
> Software Architect   | [EMAIL PROTECTED]
> Zend - The PHP Company   | http://www.zend.com/
>



-- 
Bradley Holt
[EMAIL PROTECTED]


Re: [fw-general] layout content not rendering

2008-05-28 Thread Bradley Holt
Greg,

On Wed, May 28, 2008 at 11:06 AM, Greg Donald <[EMAIL PROTECTED]> wrote:

> On 5/28/08, Bradley Holt <[EMAIL PROTECTED]> wrote:
> > This all looks correct except for one thing. I know the example in the
> > documentation uses all uppercase 'CONTENT' but it also says:
> >
> > "contentKey: the layout variable used for default content (when used with
> > the MVC). Default value is 'content'. Accessors are setContentKey() and
> > getContentKey()."
>
> That was the problem.


Interesting, so it appears that the content key *is* case sensitive (based
on your experience). In that case, the documentation should probably be
updated to change the uppercase 'CONTENT' to lowercase 'content' and perhaps
indicate that the key is case sensitive. Does someone want to file a bug
report? :-)


>
>
> Thanks,
>
>
> --
> Greg Donald
> http://destiney.com/
>



-- 
Bradley Holt
[EMAIL PROTECTED]


Re: [fw-general] layout content not rendering

2008-05-28 Thread Bradley Holt
Greg,

On Wed, May 28, 2008 at 12:21 AM, Greg Donald <[EMAIL PROTECTED]> wrote:

> In my bootstrap I'm trying to setup a default layout:
>
> $layout = Zend_Layout::startMvc( array( 'layout' => 'application',
>'layoutPath' =>
> "$dirname/../views/layouts",
>'contentKey' => 'CONTENT' ) );


This all looks correct except for one thing. I know the example in the
documentation uses all uppercase 'CONTENT' but it also says:

"contentKey: the layout variable used for default content (when used with
the MVC). Default value is 'content'. Accessors are setContentKey() and
getContentKey()."

I'm not sure if the content key is case sensitive but you might want to try
changing uppercase 'CONTENT' to lowercase 'content' or removing that option
all-together and letting it default to 'content'. I always try to assume
case sensitivity, just to be safe :-)

Can anyone say for sure if the content key is case sensitive or not? I'm
assuming it's *not* case sensitive based on the documentation.


>
>
> I'm not exactly sure what to do with that new $layout variable however.


I use the $layout variable to get its view and set that up, for example:

$view = $layout->getView();
$view->headTitle('Some Title');

But, I don't think there's any requirement that you get a reference to the
layout if you're not going to use it.


>
>
>
> So then in my layout file, application.phtml, I have this:
>
> layout()->content; ?>


This looks correct as well.


>
>
> But it produces nothing.


Do you get no output at all or do you get the layout without the content? In
other words, is your layout not rendering at all our is your layout
rendering but you're getting no content in the layout?


>
>
>
> My controller looks like this:
>
> 
> class IndexController extends Zend_Controller_Action
> {
>  public function indexAction()
>  {
>$this->render();
>  }
> }
>
>
> My view file, index.phtml, looks like this:
>
> In index view
>
>
> So what do I have to do to get the content from my view template to
> render in my layout?


A couple other troubleshooting questions. Are you getting any errors (and do
you have error reporting turned on)? Are you sure your rewrite is working
correctly?


>
>
>
> --
> Greg Donald
> http://destiney.com/
>



-- 
Bradley Holt
[EMAIL PROTECTED]


Re: [fw-general] Zend Framework and Dojo

2008-05-21 Thread Bradley Holt
Matthew,

On Wed, May 21, 2008 at 4:19 PM, Matthew Weier O'Phinney <[EMAIL PROTECTED]>
wrote:

> -- Bradley Holt <[EMAIL PROTECTED]> wrote
> (on Wednesday, 21 May 2008, 03:49 PM -0400):
> > We probably will not be switching to Dojo (but I'll be looking into it
> for
> > sure), even with it being available as part of ZF. We currently use
> jQuery.
> > Part of the benefit of using jQuery is that a CSS designer can learn how
> to use
> > it. This is because they can take the same concept of applying style
> using CSS
> > selectors but instead add behavior using CSS selectors (leveraging the
> skills
> > they already have and not burdening a developer with the work). Sure, for
> > full-on RIAs ZF + Dojo will probably be the best option. But with jQuery
> our
> > designers can do a lot of the JavaScript work - I'm not going to ask a
> designer
> > to learn Dojo as it seems a lot more complicated (I haven't used Dojo,
> just
> > read through some of the documentation).
>
> Actually, in many cases, using Dojo is as simple or simpler than what
> you've just stated regarding jquery. ;-)


I'll definitely be checking out Dojo with this new ZF integration - I really
don't know enough to speak very intelligently about it. Heck, the fact that
you recommend and like using Dojo is enough for me to check it out, never
mind the ZF integration. ;-)


>
>
> For instance, want to make a date chooser?
>
>


OK, now I remember one of the things that turned me off about Dojo when I
first looked at. I'm a stickler for valid XHTML and the dojoType attribute
breaks validity. I realize this is just for illustrative purposes and
there's probably a way to use Dojo and still have valid XHTML. I'll look
into it more on my own (don't want to turn this into a Dojo discussion).


>
>
> If you want to modify based on CSS selectors, you can leverage
> dojo.query():
>
>dojo.query('#foo li a').style("text-decoration: none; color: #F00;");
>

Right after I sent out my email I did some Googling (sorry, "web searching")
and found dojo.query - I'm curious as to how it compares to jQuery, I'll
definitely take a look at it.


>
> Dojo has come a long way in the past year, and many things have become
> trivial to perform. It's definitely worth looking into.
>
> But, again, just because we're going to partner with Dojo does not mean
> ZF users need to use Dojo. If you're comfortable with a JS library
> already, ZF will continue to accomodate it. :-)


Definitely - I don't see integrating jQuery with ZF to be much of a problem,
especially with this new component.


>
>
> > My point being that I would find jQuery + ZF integration useful because
> > switching to Dojo probably doesn't make sense for us.
>
> Exactly. And perhaps that will lead to you or others contributing jQuery
> integration in the future. :-)


Already thought of it, now if I could only find the time to actually
contribute something to ZF :-)


>
>
>
> > On Wed, May 21, 2008 at 3:35 PM, Rob Allen <[EMAIL PROTECTED]> wrote:
> >
> >
> > On 21 May 2008, at 20:15, Pádraic Brady wrote:
> >
> >
> > It's really great news! And once the Dojo implementation is in
> place as
> > a template it's an open field for someone to step up and do
> something
> > similar for the lighter libraries like jQuery.
> >
> >
> >
> > I wonder if this will actually happen long term?
> >
> > I think you can essentially assume that most other JS/Ajax libraries
> won't
> > be used with ZF by the majority of developers once the new Zend-Dojo
> stuff
> > is released. There just won't be the same level of documentation,
> mailing
> > list or irc help on how to do stuff compared to using Dojo.
> >
> > Even if the relevant components are written for another JS library,
> to
> > adopt them you have to decide if they will be keep up with the
> official
> > Zend-Dojo components over the years that follow. Who will maintain
> them and
> > update them through ZF 2.0, 3.0 etc? This is the bit that would worry
> me
> > about adopting something other than Dojo for use with ZF over the
> long
> > term.
> >
> >
> > I'm planning on telling my developers at work that we need to migrate
> to
> > Dojo over the next 6 months.  I had a look at the Dojo docs and at
> first
> > glance they don't look as comprehensive as we've been used to, but
> I'm sure
> > we'll manage.
> >
> >
> > Regards,
> >
> > Rob...
> >
> >
> >
> >
> > --
> > Bradley Holt
> > [EMAIL PROTECTED]
> >
>
> --
> Matthew Weier O'Phinney
> Software Architect   | [EMAIL PROTECTED]
> Zend - The PHP Company   | http://www.zend.com/
>



-- 
Bradley Holt
[EMAIL PROTECTED]


Re: [fw-general] Zend Framework and Dojo

2008-05-21 Thread Bradley Holt
We probably will *not* be switching to Dojo (but I'll be looking into it for
sure), even with it being available as part of ZF. We currently use jQuery.
Part of the benefit of using jQuery is that a CSS designer can learn how to
use it. This is because they can take the same concept of applying style
using CSS selectors but instead add behavior using CSS selectors (leveraging
the skills they already have and not burdening a developer with the work).
Sure, for full-on RIAs ZF + Dojo will probably be the best option. But with
jQuery our designers can do a lot of the JavaScript work - I'm not going to
ask a designer to learn Dojo as it seems a lot more complicated (I haven't
used Dojo, just read through some of the documentation).

My point being that I would find jQuery + ZF integration useful because
switching to Dojo probably doesn't make sense for us.

On Wed, May 21, 2008 at 3:35 PM, Rob Allen <[EMAIL PROTECTED]> wrote:

>
> On 21 May 2008, at 20:15, Pádraic Brady wrote:
>
> It's really great news! And once the Dojo implementation is in place as a
> template it's an open field for someone to step up and do something similar
> for the lighter libraries like jQuery.
>
>
>
> I wonder if this will actually happen long term?
>
> I think you can essentially assume that most other JS/Ajax libraries won't
> be used with ZF by the majority of developers once the new Zend-Dojo stuff
> is released. There just won't be the same level of documentation, mailing
> list or irc help on how to do stuff compared to using Dojo.
>
> Even if the relevant components are written for another JS library, to
> adopt them you have to decide if they will be keep up with the official
> Zend-Dojo components over the years that follow. Who will maintain them and
> update them through ZF 2.0, 3.0 etc? This is the bit that would worry me
> about adopting something other than Dojo for use with ZF over the long term.
>
>
> I'm planning on telling my developers at work that we need to migrate to
> Dojo over the next 6 months.  I had a look at the Dojo docs and at first
> glance they don't look as comprehensive as we've been used to, but I'm sure
> we'll manage.
>
>
> Regards,
>
> Rob...
>



-- 
Bradley Holt
[EMAIL PROTECTED]


Re: [fw-general] leaving Zend

2008-05-21 Thread Bradley Holt
Darby,

Thank you for all of your contributions to Zend Framework and I wish you the
best in your future endeavors!

On Wed, May 21, 2008 at 10:10 AM, Darby Felton <[EMAIL PROTECTED]>
wrote:

> Hi all,
>
> My last day at Zend will be this Friday, May 23. It's been an indescribably
> great experience working with the Zend Framework team and with you, the Zend
> Framework community. Now it's time for me to move on to new opportunities
> and challenges, but I'll never forget the amazing people with whom I have
> worked on this project.
>
> My personal e-mail address is this, [EMAIL PROTECTED] Please feel
> free to contact me anytime. I'd be happy to hear from you. :)
>
> Best regards,
> Darby
>



-- 
Bradley Holt
[EMAIL PROTECTED]


Re: [fw-general] Establishing naming conventions for Zend Framework 2.0

2008-05-20 Thread Bradley Holt
+1 As others have said, and I agree, it's OK to break backwards
compatibility in a major version release (with one caveat that I'll outline
below). Refactoring my web applications to use the new class names shouldn't
be that difficult.

Someone suggested a "compatibility layer" that is marked as "deprecated." I
think this is a good idea but should be should either be done in a 1.x
release (still maintains BC but informs developers stuff will be changing in
the next major release) or it should be done in the 2.0 release with plans
of deleting the deprecated "compatibility layer" in 3.0. Either way, I think
the warning that something is deprecated should be made in a major version
*before* the deprecated code is removed (if at all possible).

On Tue, May 20, 2008 at 12:00 AM, Matthew Ratzloff <[EMAIL PROTECTED]>
wrote:

> This seems like a perennial issue for me, but I'm bringing it up again
> because I think it's worthwhile.
>
> Since the beginning of this project, there hasn't really been much in the
> way of direction given on naming standards for classes in Zend Framework.
> This lack of consistency is what has yielded two nomenclatures for CLI
> components ("Zend_Console" vs. "Zend_Controller_Response_Cli"), differing
> terms for similar concepts ("Zend_Json_Decoder" vs. "Zend_Mime_Decode"),
> both nouns and verbs in equal measure ("Zend_Loader" but not
> "Zend_Translator"; alternately, "Zend_Translate" but not "Zend_Load"), and
> so on.
>
> I first brought this issue up in February 2007 and concluded, "Consistency
> means predictability, which means being able to recall names without having
> to check the manual every time. It's why most people can't use PHP's date or
> string functions without looking at the documentation, for example."
> There was a lot of agreement from the community (and a couple Zenders) but
> no movement because the framework was preparing for 1.0.  At the time I was
> told, "There is life after 0.9.0," and so as we prepare for 2.0, I think
> it's the perfect time to revisit this.
>
> -Matt
>



-- 
Bradley Holt
[EMAIL PROTECTED]


Re: [fw-general] Zend_Db_Table - A class for every table? Overhead?

2008-05-20 Thread Bradley Holt
Philip,

On Tue, May 20, 2008 at 8:48 AM, Philip G <[EMAIL PROTECTED]> wrote:

> On Mon, May 19, 2008 at 4:02 PM, Bradley Holt <[EMAIL PROTECTED]>
> wrote:
>
>> Philip,
>>
>> On Mon, May 19, 2008 at 4:54 PM, Philip G <[EMAIL PROTECTED]> wrote:
>>
>>>
>>> I'm at a bit of an impasse here.
>>>
>>> I'm trying to understand the reason for having a Zend_Db_Table object for
>>> every table in the database while balancing the class creation overhead. In
>>> PHP, creating a class (especially a Zend_Db_Table class) has a fair bit of
>>> overhead. It's not something that's small either. A quick creation of 7-8
>>> objects can easily slow the application down by 3-4 seconds.
>>
>>
>> Do you have some data to back that up? I've never heard of object creation
>> being anywhere close to that slow in PHP. I would think the time to create
>> an object would be negligible compared to the overhead of database access
>> itself.
>>
>>
>
> Sure. I'll try to get a little test together. I happen to have experienced
> first hand looping over ~8-10 "survey answers" where initially I created a
> new table object for each one.
>
> My program was up to 5-6 seconds to complete. I traced it down to one
> section where I was looping over all my survey answers and inserting them
> into the table (one row per answer). Initially, I created a new class for
> each one. My thought was "a new row, a new class" -- I did that, but it
> slowed down that section by 3 seconds. So I changed my wrapper class to use
> a static variable for the table and did an insert() against that. Dropped it
> down to under a second execution for that one section.


Do you mean "a new row, a new class" or "a new row, a new object?" I can't
imagine you mean the first, but just asking ;-)

Also, are you instantiating the Zend_Db_Table objects on each iteration of
the loop? I'm pretty sure (someone correct me if I'm wrong on this) that you
only need one instance of each Zend_Db_Table class so I'd make sure you're
initializing the table objects you'll need before you enter the loop.


>
>
> theories as to the cause:
>  - Our DB is Oracle, on a remote host. We have remote connection lag.
>  - Every time you create a new DB Table object, Zend_Db pulls a describe.
> That describe adds noticeable lag when looping over 8 objects within
> seconds.
>  - Creating a new class isn't obtimal, but does show natural possible lag
> issues.
>
> I was creating a new table object for every row getting inserted; which was
> probably a bad idea. However, it does show an example on how creating table
> objects can slow down code.
>
> (on and yes, each object was using the same static db connector)
>
> Additionally, object creation overhead is going to be insignificant
>> compared to DB access; I've created scripts that create many thousands
>> of objects in under a second.
>
>
> I'm curious on the benchmarks on creating classes. I'm often in battles
> with a fellow co-worker about class creation. lol
> He's a speed extremist; and I mean extremist. He's all about pulling even
> the most minute of milliseconds out for speed (eg: he advocates if/else
> instead of ternary). It's hard to get him on board when PHP objects have an
> inherited overhead. :(
> This above example is an extreme case, but definitely shows the inherent
> lag within PHP class creation. It's a bit hard to speak for PHP classes when
> we do see this lag issues. He's very, very much against constant class
> creation -- hard to argue without real ammo against it.
>

You might point out to him that premature optimization is the root of all
evil <http://c2.com/cgi/wiki?PrematureOptimization> :-)

Seriously, though, is he optimizing after you've got a good design or is he
trying to build optimization into the original design? I usually find it
best to have a good design first, and then optimize later. A good design can
be refactored to be more optimized but a bad design can be a real pain to
maintain, no matter how fast it is. Usually your assumptions about what
parts of your code will be slow are wrong so not focusing on good design
first can actually make it so you end up with less optimized code because it
becomes so difficult to refactor.


>
>
>
> wow that seems slow, try looking for any
>> sleep(rand(3,4));
>>
>> only j/k lol ;-)
>>
>
>
> Ha. I laughed. ;-)
>
>
>
> --
> Philip
> [EMAIL PROTECTED]
> http://www.gpcentre.net/
>



-- 
Bradley Holt
[EMAIL PROTECTED]


Re: [fw-general] Zend_Db_Table - A class for every table? Overhead?

2008-05-19 Thread Bradley Holt
Philip,

On Mon, May 19, 2008 at 4:54 PM, Philip G <[EMAIL PROTECTED]> wrote:

>
> I'm at a bit of an impasse here.
>
> I'm trying to understand the reason for having a Zend_Db_Table object for
> every table in the database while balancing the class creation overhead. In
> PHP, creating a class (especially a Zend_Db_Table class) has a fair bit of
> overhead. It's not something that's small either. A quick creation of 7-8
> objects can easily slow the application down by 3-4 seconds.


Do you have some data to back that up? I've never heard of object creation
being anywhere close to that slow in PHP. I would think the time to create
an object would be negligible compared to the overhead of database access
itself.


> In my environment, that's a great deal. Compound that with the fact our
> database is extremely normalized and we're often working with a dozen tables
> for a simple application...is the overhead worth it?
>
> I like Zend_Db_Table. I like the functionality it gives, but I'm having a
> hard time justifying to myself, and my peers, the noticible performance
> impact it creates.
>
> It just feels having a class per table has some uncessary overhead. Why not
> a couple/few static classes for basics: insert, update. I often do selects
> across 3-4 tables at a time, and the current Zend_Db_Table implementation
> doesn't seem to make this much easier than just creating my own select
> statement using Zend_Db_Select.
>
> For some reason, it seems as if I'm missing somethingam I?
>
> --
> Philip
> [EMAIL PROTECTED]
> http://www.gpcentre.net/




-- 
Bradley Holt
[EMAIL PROTECTED]


Re: [fw-general] Example Zend Framework Blog Application Tutorial: Parts 1-8

2008-05-15 Thread Bradley Holt
Paddy,

You may want to check out Mosso <http://www.mosso.com/> as well. If you
don't want to pay for a full account, I can set you up with one under our
resell account. You can contact me off-list if you're interested.

Thanks,
Bradley

On Thu, May 15, 2008 at 11:07 AM, Pádraic Brady <[EMAIL PROTECTED]>
wrote:

>
> Slicehost.com look like a good candidate. Minimal upfront management. Just
> some expandable VPS instances and lots of Ubuntu to select from. I'll
> probably throw up something using apt to get started and customise from
> there. Their frontend is written in Ruby though ;).
>
> Paddy
>
>
> Federico Cargnelutti-3 wrote:
> >
> > I heard that Zend has now bigger and more powerful servers and that they
> > are
> > giving aways free hosting to distinctive members of its community ;)
> >
> > If that's not true, check out Bytemark, it gives you a Linux VM (Debian
> or
> > Ubuntu).
> >
> > http://www.bytemark.co.uk/
> >
> >
> > On Thu, May 15, 2008 at 9:29 AM, Pádraic Brady <[EMAIL PROTECTED]>
> > wrote:
> >
> >>
> >> Quite right - working on something for that.
> >>
> >> Another improvement would be keeping it online ;). My current hosting
> >> provider have decided my blog creates far too much trouble for the
> server
> >> it's hosted on and have promptly disabled it. A quick analysis shows
> >> traffic
> >> to the blog has been spiking for the last week at levels up to 10 times
> >> normal. I tried a few things like bypass caching, and patching so
> Headers
> >> allow better caching, but no such luck. The minute it's back online,
> it's
> >> swarmed to death. The server capacity simply isn't sufficient - full
> >> stop.
> >>
> >> I seriously underestimated how popular this series would be.
> >>
> >> I'm working towards a much improved VPS solution so I can get everything
> >> back online on a high capacity server. Unfortunately since it's my
> >> personal
> >> blog, and personal apps, I really won't have time to do all that before
> >> the
> >> weekend.
> >>
> >>
> >> Rob Allen-3 wrote:
> >> >
> >> >
> >> > On 13 May 2008, at 17:04, Wil Sinclair wrote:
> >> >
> >> >> No goodwill points deducted, Paddy. :) If anyone has something that
> >> >> they feel the larger community will find of value- and I don't think
> >> >> there is any doubt in this regard towards Paddy's tutorial series-
> >> >> then feel free to post links here.
> >> >>
> >> >> ,Wil
> >> >
> >> >
> >> > I agree - it's an excellent tutorial series. It could do with a start
> >> > page that lists all the parts though :)
> >> >
> >> > Regards,
> >> >
> >> > Rob...
> >> >
> >> >
> >>
> >>
> >> -
> >> Pádraic Brady
> >>
> >> http://blog.astrumfutura.com
> >> http://www.patternsforphp.com
> >> OpenID Europe Foundation - Irish Representative
> >> --
> >> View this message in context:
> >>
> http://www.nabble.com/Example-Zend-Framework-Blog-Application-Tutorial%3A-Parts-1-8-tp17210745p17248339.html
> >> Sent from the Zend Framework mailing list archive at Nabble.com.
> >>
> >>
> >
> >
>
>
> -
> Pádraic Brady
>
> http://blog.astrumfutura.com
> http://www.patternsforphp.com
> OpenID Europe Foundation - Irish Representative
> --
> View this message in context:
> http://www.nabble.com/Example-Zend-Framework-Blog-Application-Tutorial%3A-Parts-1-8-tp17210745p17255427.html
> Sent from the Zend Framework mailing list archive at Nabble.com.
>
>


-- 
Bradley Holt
[EMAIL PROTECTED]


Re: [fw-general] Web services & licensing issue

2008-05-08 Thread Bradley Holt
On Thu, May 8, 2008 at 12:16 PM, Marcus Bointon <[EMAIL PROTECTED]>
wrote:

> On 8 May 2008, at 17:00, Greg Donald wrote:
>
>  A webservice is just a fancy buzzword for "we wrap our content in XML
>> for your convenience".  If it's not supposed to be public then it
>> should require authentication.
>>
>
>
> So you're saying that you think all public web pages are copyright-free?


This is why I earlier brought up the differentiation between the licensing
of the *content* and the use of the *service*. Any public web page is
implicitly letting you "use" it (access it, load the page, have your web
browser cache it, etc.). This goes for a web service as well - unless it's
locked behind an API key then one can assume the *service* is free to be
used as you want (now, there are probably terms of use which one should be
aware of). None of this means that you have anything beyond fair-use rights
to the *content* of that website or web service. In this situation
(Audioscrobbler), the license only applies to the *content* not the
*service*.


>
>
> Marcus
> --
> Marcus Bointon
> Synchromedia Limited: Creators of http://www.smartmessages.net/
> UK resellers of [EMAIL PROTECTED] CRM solutions
> [EMAIL PROTECTED] | http://www.synchromedia.co.uk/
>
>
>


-- 
Bradley Holt
[EMAIL PROTECTED]


Re: [fw-general] Web services & licensing issues

2008-05-07 Thread Bradley Holt
Federico,

I was curious as to how one could legally license a web service (unless it's
through an API key that can only be obtained for non-commercial use) as a
license does not make much sense for a web services API (a "terms of use"
may make sense, not a license). So, I went and looked at the Audioscrobbler
Web Services <http://www.audioscrobbler.net/data/webservices/> page and it
looks like technically the Audioscrobbler *content* you retrieve through the
web service is licensed under a Creative Commons
Attribution-NonCommercial-ShareAlike License, not the use of the web service
itself. I know this probably sounds like a trivial point, but I think it's
important. I haven't used Audioscrobbler, but I imagine anyone using the
Audioscrobbler API is an Audioscrobbler user who is aware that the content
on Audioscrobbler is licensed under the Creative Commons
Attribution-NonCommercial-ShareAlike License (or at least that it's
copyrighted material) and that the API wouldn't give you any special license
to this content that you wouldn't otherwise have. Perhaps someone who is an
Audioscrobbler user can shed more light on this.

On Wed, May 7, 2008 at 4:37 AM, Federico Cargnelutti <
[EMAIL PROTECTED]> wrote:

> Hi,
>
> A quick question, visiting the Audioscrobbler's site, I found out that the
> Web service they provide is for non-commercial use only and it's distributed
> under the Creative Commons Attribution-NonCommercial-ShareAlike License. No,
> this is a bit confusing, people/companies using the
> Zend_Service_Audioscrobbler, for example, might be using their service
> illegally without knowing it. If that's the case, I might be wrong, a couple
> of questions:
>
> 1. Is this documented somewhere?
> 2. What are the requirements, in terms of licensing, when a web service is
> proposed?
> 3. Are there any other components/services distributed with the Zend
> Framework that cannot be used in commercial sites that we need to be aware
> of?
>
> Regards,
> Federico.
>
>
>
>
>


-- 
Bradley Holt
[EMAIL PROTECTED]


Re: [fw-general] Webinar - Thanks!

2008-04-30 Thread Bradley Holt
I was hoping to be able to listen to it but I missed it :-(

I'd definitely be interested in some links to anyone blogging about it.
Also, please get the archived version up ASAP! :-)

On Wed, Apr 30, 2008 at 2:03 PM, Ryan Brooks <[EMAIL PROTECTED]> wrote:

>  Howdy folks,
>
>
>
> Just wanted to extend my gratitude to the ZF team for putting the webinar
> together; some very cool discussion and questions.
>
>
>
> Also want to pose the question: anyone blogging about it now that it is
> over?
>
> *Ryan Brooks*
> Web Developer & Technophile
> zed23.com <http://www.zed23.com/>
>
>
>



-- 
Bradley Holt
[EMAIL PROTECTED]


Re: [fw-general] authenticate only with password with database adapter ?

2008-04-30 Thread Bradley Holt
On Wed, Apr 30, 2008 at 12:12 PM, cjant83 <[EMAIL PROTECTED]> wrote:

>
> I wouldnt like to do this either (requesting just a password). Another
> thought by 'salting' the password you could avoid a message popping up
> if the users chose the same password.


Yes, but I don't see how this solve the problem. Two people can now have the
same password, sure (because technically there different passwords in the
database). But, when someone attempts to login using just that password
(without providing a username) how do you know which users' salt to use?


>
>
> Chris.
>
>
>
>
>
> bradley.holt wrote:
> >
> > On Wed, Apr 30, 2008 at 11:59 AM, Chris Jones <[EMAIL PROTECTED]> wrote:
> >
> >> My suggestion would be to set everything up as if you required a
> >> username and password; a column in your users table for a
> >> id,username,password. On the front end only have a password field for
> >> the user to complete.
> >>
> >> In your auth controller instead of passing a value into
> >> setIdentity($username) from a form, pass the password
> >>
> >> setIdentity($password);
> >>
> >> Every user in your users table would have the same value in the
> >> username and password column. By doing this each 'user' would be
> >> unique as you could assign an id to them.
> >>
> >> The problem is someone might choose the same password. The way around
> >> this would be to make a check when you register a new user or setup a
> >> new password that the value is unique.
> >
> >
> > For this reason, I would ask Denis to question the spec here. It seems
> to
> > me
> > that only requiring a password is a *really bad* idea. As soon as a user
> > is
> > told they need to pick a different password because one is already in
> use,
> > they can now login as that other user!
> >
> >
> >>
> >>
> >> Dont know if thats the best way, but what came to my mind. If it
> >> doesnt make sense let me know ill try explain better :)
> >>
> >> Chris.
> >>
> >>
> >>
> >>
> >> 2008/4/30 Denis Fohl <[EMAIL PROTECTED]>:
> >> > Hi all,
> >> >
> >> > i'm trying to simplify the authentification process as my client
> would
> >> like
> >> > to have only one input field to fill with password.
> >> >
> >> > As it is documented, the identity column must contain unique values
> >> but,
> >> in
> >> > this case, the identity should be the same for each user.
> >> >
> >> > Is there a way to do so ?
> >> >
> >> > Thank you.
> >> >
> >> > Denis.
> >> >
> >> >
> >> >
> >>
> >>
> >>
> >> --
> >> Chris.
> >>
> >
> >
> >
> > --
> > Bradley Holt
> > [EMAIL PROTECTED]
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/authenticate-only-with-password-with-database-adapter---tp16979051p16986302.html
> Sent from the Zend Framework mailing list archive at Nabble.com.
>
>


-- 
Bradley Holt
[EMAIL PROTECTED]


Re: [fw-general] authenticate only with password with database adapter ?

2008-04-30 Thread Bradley Holt
On Wed, Apr 30, 2008 at 11:59 AM, Chris Jones <[EMAIL PROTECTED]> wrote:

> My suggestion would be to set everything up as if you required a
> username and password; a column in your users table for a
> id,username,password. On the front end only have a password field for
> the user to complete.
>
> In your auth controller instead of passing a value into
> setIdentity($username) from a form, pass the password
>
> setIdentity($password);
>
> Every user in your users table would have the same value in the
> username and password column. By doing this each 'user' would be
> unique as you could assign an id to them.
>
> The problem is someone might choose the same password. The way around
> this would be to make a check when you register a new user or setup a
> new password that the value is unique.


For this reason, I would ask Denis to question the spec here. It seems to me
that only requiring a password is a *really bad* idea. As soon as a user is
told they need to pick a different password because one is already in use,
they can now login as that other user!


>
>
> Dont know if thats the best way, but what came to my mind. If it
> doesnt make sense let me know ill try explain better :)
>
> Chris.
>
>
>
>
> 2008/4/30 Denis Fohl <[EMAIL PROTECTED]>:
> > Hi all,
> >
> > i'm trying to simplify the authentification process as my client would
> like
> > to have only one input field to fill with password.
> >
> > As it is documented, the identity column must contain unique values but,
> in
> > this case, the identity should be the same for each user.
> >
> > Is there a way to do so ?
> >
> > Thank you.
> >
> > Denis.
> >
> >
> >
>
>
>
> --
> Chris.
>



-- 
Bradley Holt
[EMAIL PROTECTED]


Re: [fw-general] Namespacing Models in Modules

2008-04-21 Thread Bradley Holt
Matthew,

That makes sense, I will use the convention you prefer and hope it becomes
the "official" convention. Thanks!

On Mon, Apr 21, 2008 at 2:59 PM, Matthew Weier O'Phinney <[EMAIL PROTECTED]>
wrote:

> -- Bradley Holt <[EMAIL PROTECTED]> wrote
> (on Monday, 21 April 2008, 02:33 PM -0400):
> > This is a best-practices question which I can't seem to find a solid
> answer to.
> > When using the modular directory structure, do you namespace the code in
> your
> > "models" directory and if so, how? In the example given in the
> documentation,
> > the controllers are namespaced. Blog_IndexController (located in the
> file
> > IndexController.php), for example, is the IndexController for the "blog"
> > module. Following this logic, it would make sense to also namespace the
> code in
> > your "models". However, do you start out with a top-level directory for
> your
> > root namespace (as is done in components) like this:
> >
> > blog/models/Blog/Foo.php (class is Blog_Foo)
> >
> > or do you just assume that the top-level namespace is the same as the
> module
> > name:
> >
> > blog/models/Foo.php (class is still Blog_Foo)
> >
> > Which do you prefer? Is there a best-practice for this yet? If there is
> a
> > best-practice for this, then it should be added to the documentation
> (unless I
> > missed it?).
>
> We haven't addressed naming conventions for models to date. However, I
> prefer the latter method, and there is already a proposal for a
> ModelLoader action helper that would also use the same conventions
> (i.e., Blog_Foo in blogs/models/Foo.php). Once we have an official
> component, the convention will be documented.
>
> --
> Matthew Weier O'Phinney
> Software Architect   | [EMAIL PROTECTED]
> Zend - The PHP Company   | http://www.zend.com/
>



-- 
Bradley Holt
[EMAIL PROTECTED]


[fw-general] Namespacing Models in Modules

2008-04-21 Thread Bradley Holt
This is a best-practices question which I can't seem to find a solid answer
to. When using the modular directory
structure<http://framework.zend.com/manual/en/zend.controller.modular.html>,
do you namespace the code in your "models" directory and if so, how? In the
example given in the documentation, the controllers are namespaced.
Blog_IndexController (located in the file IndexController.php), for example,
is the IndexController for the "blog" module. Following this logic, it would
make sense to also namespace the code in your "models". However, do you
start out with a top-level directory for your root namespace (as is done in
components) like this:

blog/models/Blog/Foo.php (class is Blog_Foo)

or do you just assume that the top-level namespace is the same as the module
name:

blog/models/Foo.php (class is still Blog_Foo)

Which do you prefer? Is there a best-practice for this yet? If there is a
best-practice for this, then it should be added to the documentation (unless
I missed it?).

-- 
Bradley Holt
[EMAIL PROTECTED]


Re: [fw-general] Simplicity Meets Power and not Simplicity, Meets Power

2008-04-17 Thread Bradley Holt
Eric,

Great to hear from an actual enterprise ZF user! I'm not at all surprised to
see ZF used in the enterprise and to hear that there isn't much competition
to ZF in this space. Just because (in my guess) the majority of ZF users are
not enterprise users doesn't mean that enterprise users aren't a *very
important* group of ZF users. I totally understand that ZF has a commercial
aspect and that it's target audience (at least on the commercial end) is the
enterprise and that hopefully it's use in the enterprise will help drive
it's continued improvement. It's just that I dislike when the word
"enterprise" is used as a catch-all phrase. Like I said, if the word
"enterprise" is used in a context where it truly is meant to speak to
enterprise users (not us little guys to impress us with how enterprisey it
is) then I see that as being perfectly fine.

On Thu, Apr 17, 2008 at 10:15 AM, Eric Marden <[EMAIL PROTECTED]>
wrote:

>  For the record, I work for an Enterprise and would choose no other
> framework for our work here, even though I'm a fan of other frameworks.
>
> And while it has been overused, I believe the connotation for most people
> is that Enterprise means lots of employees helping the company generate lots
> of revenue. In the US these would be your Fortune 1000 companies. Just my
> take on the word I guess.
>
> But then again... we lost the word 'hacker' to misuse as well...
>
> --
> Eric Marden
>
>
>  --
> *From:* Bradley Holt [mailto:[EMAIL PROTECTED]
> *Sent:* Wednesday, April 16, 2008 3:34 PM
> *To:* Joó Ádám
> *Cc:* Eric Marden; fw-general@lists.zend.com
> *Subject:* Re: [fw-general] Simplicity Meets Power and not Simplicity,
> Meets Power
>
> Ugh, what the heck is the word 
> enterprise<http://terrychay.com/blog/article/enterprise-scalability.shtml>suppose
>  to mean in this context, anyways? I'd attempt to actively avoid the
> following buzzwords, especially in slogans:
>
>- enterprise
>- web 2.0
>- agile (this one isn't *quite* as bad as it has a more clear
>definition)
>
> These buzzwords can mean many things to different people so don't really
> communicate much when used in a slogan. With enterprise, for example, I
> doubt the majority of ZF users in-fact work in an enterprise-size company.
> "Enterprises" may, in fact, be the target market for the *commercial* end
> of ZF. However, we have a vague notion that if it's for "enterprise" it must
> be good. But, since we don't work for an enterprise-size company, we don't
> really know what those aspects are so not much is really communicated here
> other than, "it's good" which doesn't carry much substance. In other words,
> if your truly saying "enterprise" to *directly* target actual
> enterprise-size companies, that's fine. But it comes across more as
> targeting those of us who don't work at an enterprise-size company but think
> that it must be good if it's good for enterprises. I think there are a lot
> of great things to be said about ZF that are more substantive.
>
> On Wed, Apr 16, 2008 at 3:12 PM, Joó Ádám <[EMAIL PROTECTED]> wrote:
>
> > My favourite is Enterprise-strength PHP.
> >
> >
> > Regards,
> > Ádám
> >
>
>
>
> --
> Bradley Holt
> [EMAIL PROTECTED]
>
>


-- 
Bradley Holt
[EMAIL PROTECTED]


Re: [fw-general] Simplicity Meets Power and not Simplicity, Meets Power

2008-04-16 Thread Bradley Holt
Wil,

Well put. I didn't mean to imply that ZF wasn't enterprise software - I most
certainly think it is (for all the reasons you enumerated and more)! As long
as you're truly using the word "enterprise" to speak to enterprise
customers, then I think it's perfectly fine to use the word. I just don't
like when it's used as a catch-all phrase with no actual meaning behind it.

I hear you about "web 2.0" - you need to have a certain amount of buzzword
compliance these days. I was considering putting a "buzzword compliance"
page on our website where potential clients can go to see if we do all the
cool things they read about in Wired Magazine ;-)

Like I said before, I don't think there's anything wrong with your current
slogan but this has been an interesting thread non-the-less!

On Wed, Apr 16, 2008 at 3:58 PM, Wil Sinclair <[EMAIL PROTECTED]> wrote:

>  Well, 'enterprise' to me has a very specific meaning that is captured
> well in Wikipedia: http://en.wikipedia.org/wiki/Enterprise_software.
>
> That said, note the 'criticism' section at the bottom of the entry, which
> reflects your point well. I believe that's the first time I've seen a
> criticism section in Wikipedia for a single word. J
>
> The idea is with features like LDAP and SOAP (stay tuned on this one), ZF
> is perfect for building enterprise software. I see this as one of our sweet
> spots among PHP frameworks, and it certainly makes for an important part of
> our user base as far as Zend is concerned. I think it's fair to say that we
> directly target enterprise-sized companies in our marketing. But you might
> be surprised how many ZF users actually work in 'enterprise-size' companies.
> For whatever reason, they seem to have disproportionate representation on
> the lists, but I don't think that's necessarily uncommon for open source
> projects that are used in the enterprise.
>
> You'll see 'Web 2.0' come up in our marketing; it would be hard for us not
> to use it in today's web dev env. But I have specifically asked that we
> avoid the term 'agile' to describe anything even remotely related to
> development methodology since I'm a BIG agile methodology fan, and I don't
> feel our development methodology on this project could currently be
> classified as 'agile'. And, AFAIK, there is nothing that we do in our
> codebase or docs to facilitate agile methodologies beyond just being a great
> framework to use in such an environment. J In the broader sense of the
> term, ZF is truly more agile than other frameworks in that we endeavor to
> try to exhaustively gather and respond as quickly as possible to our users'
> needs. I would say 'agile' is one of the most loaded terms in our current
> web dev lexicon.
>
> I hope this discussion isn't wearing thin for those who come to this list
> looking for a more technical perspective. I happen to think these issues are
> very important and will have a large impact on all ZF users as we drive more
> adoption.
>
>
>
> ,Wil
>
>
>
> *From:* Bradley Holt [mailto:[EMAIL PROTECTED]
> *Sent:* Wednesday, April 16, 2008 12:34 PM
> *To:* Joó Ádám
> *Cc:* Eric Marden; fw-general@lists.zend.com
> *Subject:* Re: [fw-general] Simplicity Meets Power and not Simplicity,
> Meets Power
>
>
>
> Ugh, what the heck is the word 
> enterprise<http://terrychay.com/blog/article/enterprise-scalability.shtml>suppose
>  to mean in this context, anyways? I'd attempt to actively avoid the
> following buzzwords, especially in slogans:
>
>- enterprise
>- web 2.0
>- agile (this one isn't *quite* as bad as it has a more clear
>definition)
>
> These buzzwords can mean many things to different people so don't really
> communicate much when used in a slogan. With enterprise, for example, I
> doubt the majority of ZF users in-fact work in an enterprise-size company.
> "Enterprises" may, in fact, be the target market for the *commercial* end
> of ZF. However, we have a vague notion that if it's for "enterprise" it must
> be good. But, since we don't work for an enterprise-size company, we don't
> really know what those aspects are so not much is really communicated here
> other than, "it's good" which doesn't carry much substance. In other words,
> if your truly saying "enterprise" to *directly* target actual
> enterprise-size companies, that's fine. But it comes across more as
> targeting those of us who don't work at an enterprise-size company but think
> that it must be good if it's good for enterprises. I think there are a lot
> of great things to be said about ZF that are more substantive.
>
> On Wed, Apr 16, 2008 at 3:12 PM, Joó Ádám <[EMAIL PROTECTED]> wrote:
>
> My favourite is Enterprise-strength PHP.
>
>
> Regards,
> Ádám
>
>
>
>
> --
> Bradley Holt
> [EMAIL PROTECTED]
>



-- 
Bradley Holt
[EMAIL PROTECTED]


Re: [fw-general] Simplicity Meets Power and not Simplicity, Meets Power

2008-04-16 Thread Bradley Holt
On Wed, Apr 16, 2008 at 4:01 PM, Josh Team <[EMAIL PROTECTED]> wrote:

> In support of Bradley Holt I propose:
>
> Zend Framework: The agile enterprise framework for web 2.0 :)


Brilliant!


>
>
> On Wed, Apr 16, 2008 at 2:34 PM, Bradley Holt <[EMAIL PROTECTED]>
> wrote:
>
> > Ugh, what the heck is the word 
> > enterprise<http://terrychay.com/blog/article/enterprise-scalability.shtml>suppose
> >  to mean in this context, anyways? I'd attempt to actively avoid the
> > following buzzwords, especially in slogans:
> >
> >- enterprise
> >- web 2.0
> >- agile (this one isn't *quite* as bad as it has a more clear
> >definition)
> >
> > These buzzwords can mean many things to different people so don't really
> > communicate much when used in a slogan. With enterprise, for example, I
> > doubt the majority of ZF users in-fact work in an enterprise-size company.
> > "Enterprises" may, in fact, be the target market for the *commercial*end of 
> > ZF. However, we have a vague notion that if it's for "enterprise" it
> > must be good. But, since we don't work for an enterprise-size company, we
> > don't really know what those aspects are so not much is really communicated
> > here other than, "it's good" which doesn't carry much substance. In other
> > words, if your truly saying "enterprise" to *directly* target actual
> > enterprise-size companies, that's fine. But it comes across more as
> > targeting those of us who don't work at an enterprise-size company but think
> > that it must be good if it's good for enterprises. I think there are a lot
> > of great things to be said about ZF that are more substantive.
> >
> >
> > On Wed, Apr 16, 2008 at 3:12 PM, Joó Ádám <[EMAIL PROTECTED]> wrote:
> >
> > > My favourite is Enterprise-strength PHP.
> > >
> > >
> > > Regards,
> > > Ádám
> > >
> >
> >
> >
> > --
> > Bradley Holt
> > [EMAIL PROTECTED]
> >
> >
>


-- 
Bradley Holt
[EMAIL PROTECTED]


Re: [fw-general] Simplicity Meets Power and not Simplicity, Meets Power

2008-04-16 Thread Bradley Holt
Ugh, what the heck is the word
enterprise<http://terrychay.com/blog/article/enterprise-scalability.shtml>suppose
to mean in this context, anyways? I'd attempt to actively avoid the
following buzzwords, especially in slogans:

   - enterprise
   - web 2.0
   - agile (this one isn't *quite* as bad as it has a more clear
   definition)

These buzzwords can mean many things to different people so don't really
communicate much when used in a slogan. With enterprise, for example, I
doubt the majority of ZF users in-fact work in an enterprise-size company.
"Enterprises" may, in fact, be the target market for the *commercial* end of
ZF. However, we have a vague notion that if it's for "enterprise" it must be
good. But, since we don't work for an enterprise-size company, we don't
really know what those aspects are so not much is really communicated here
other than, "it's good" which doesn't carry much substance. In other words,
if your truly saying "enterprise" to *directly* target actual
enterprise-size companies, that's fine. But it comes across more as
targeting those of us who don't work at an enterprise-size company but think
that it must be good if it's good for enterprises. I think there are a lot
of great things to be said about ZF that are more substantive.

On Wed, Apr 16, 2008 at 3:12 PM, Joó Ádám <[EMAIL PROTECTED]> wrote:

> My favourite is Enterprise-strength PHP.
>
>
> Regards,
> Ádám
>



-- 
Bradley Holt
[EMAIL PROTECTED]


Re: [fw-general] Simplicity Meets Power and not Simplicity, Meets Power

2008-04-16 Thread Bradley Holt
Wil,

Not that I think there's anything wrong with the existing slogan, but since
you asked for ideas...

My first thought is that you're trying to communicate simplicity, so your
slogan should be simple as well. Looking at the Why
ZF?<http://framework.zend.com/whyzf/>page gives a few keywords that
nicely describe the positive aspects of ZF.
Perhaps something as simple as:

"simplicity, power, productivity"

or, getting a tad bit clever:

"simply powerful productivity"

or, risking complexity:

"simplicity, power, and productivity for building your web applications"

or, a different approach all-together:

"from the PHP company"

On Wed, Apr 16, 2008 at 1:03 PM, Wil Sinclair <[EMAIL PROTECTED]> wrote:

>  Wow. I didn't think this would be such a point of discussion. I hope I
> can settle this once and for all. It is proper English- "meet" is
> imperative; "Simplicity" is directly addressing simplicity by name as if it
> were a person. Take it from someone who double majored in Comparative
> Literature and Computer Science in college. J
>
> In any case, this tagline was never meant to be permanent or the sole
> slogan associated with ZF. The main point was trying to express ZF's
> philosophy in a short- hopefully memorable-slogan. In doing so, we hoped to
> differentiate ZF from the other frameworks and give it a "face". Other
> slogans were brought up that we may use in the future, perhaps even
> alongside this one. **But I'd really like to hear what you guys might come
> up with** for two reasons:
>
>
>
> 1)  We might end up with some very good slogans to use later.
>
> and
>
> 2)  I'm extremely curious what our community see as the
> differentiators for ZF and what ZF means to all of us.
>
>
>
> Please feel free to throw out ideas here. I would like to suggest you try
> to aggregate all your suggestions in one mail, however, so that we don't
> create too much non-technical traffic. And, of course, if we were to use a
> slogan suggested by a member of the community, we'd have to make sure Zend
> held the copyright and could trademark it if necessary.
>
>
>
> ,Wil
>
>
>
> *From:* Robin Skoglund [mailto:[EMAIL PROTECTED]
> *Sent:* Wednesday, April 16, 2008 9:23 AM
> *To:* fw-general@lists.zend.com
> *Subject:* Re: [fw-general] Simplicity Meets Power and not Simplicity,
> Meets Power
>
>
>
> I don't know what English courses you guys have taken, but a comma does
> not translate into the word "and". It simply states there should be a brief
> pause before continuing, whereas "John meet Sue" sounds rushed.
>
> Simplcity, Meet Power is an excellent slogan in my mind :)
>
> On Wed, Apr 16, 2008 at 6:05 PM, Joseph Crawford <[EMAIL PROTECTED]>
> wrote:
>
> Yea there should be no , that just does not make sense as it translates
> into
>
>
>
> John and meet Sue
>
>
>
> "John meet Sue"  sounds more proper
>
>
>
> On Apr 16, 2008, at 11:42 AM, Paul Mark wrote:
>
>  I see what you are trying to say, but it should be no comma there or
> "John, meet Sue"  makes no sense in this translation.
>
> Again - the "John, meet Sue" sounds funny by itself when referring to
> people ( it is out of context )and it sounds even more incorrect when
> applying to abstract or "programming" framework.
>
> It just looks unfinished...thats all...
>
>
>  On Wed, Apr 16, 2008 at 11:01 AM, Josh Team <[EMAIL PROTECTED]> wrote:
>
> I am pretty sure they are not describing the framework as "Simplicity
> Meets Power" but introducing Simplicity to Power. "John, meet Sue"
> "Simplicity, Meet Power"
>
>
>
> On Wed, Apr 16, 2008 at 9:52 AM, Martin Martinov <[EMAIL PROTECTED]>
> wrote:
>
> I'm not an expert in English, but Wil already posted the reasoning
> behind this wording. Search the archives :-)
>
>
> On 16/04/2008, photo312 <[EMAIL PROTECTED]> wrote:
> >
> >  Can someone fix it - it kind of looks embarrassing...
> >
> >  the saying should be:"Simplicity Meets Power"
> >
> >
> >
> >  --
> >  View this message in context:
> http://www.nabble.com/Simplicity-Meets-Power-and-not-Simplicity%2C-Meets-Power-tp16722510p16722510.html
> >  Sent from the Zend Framework mailing list archive at Nabble.com.
> >
> >
>
>   --
> Regards,
> Martin Martinov
> http://mmartinov.com/
>
>
>
>
>
>
>
>
>



-- 
Bradley Holt
[EMAIL PROTECTED]


Re: [fw-general] The same code can run on Windows but not Linux

2008-04-08 Thread Bradley Holt
Bill,

Oops, you are correct - my previous email was incorrect (must be too tired).
You should have:

UserController::loginAction()

and the UserController class should be in the UserController.php file.

Not sure why that doesn't work correctly for you. I don't have a copy of
"Zend Framework in Action" so can't see the example code you are looking at.
When you say, "the code cannot find the requested controller and action" is
it the url view helper that's not working or is it giving the right URL but
Zend Framework can't find the controller and action after submitting the
form?

On Tue, Apr 8, 2008 at 5:14 PM, Bill <[EMAIL PROTECTED]> wrote:

> Thanks for your answer. As my understanding, the class name should like
> "UserController" in the file "UserController.php". The function name should
> be "loginAction". I just tried to run source code (chapter 3) of "Zend
> Framework in Action". The same thing happened. It works on Windows but not
> Linux.
>
> Bill
>
>
> On Tue, Apr 8, 2008 at 2:50 PM, Bradley Holt <[EMAIL PROTECTED]>
> wrote:
>
> > Yes, my understanding is that controller and action names are
> > case-sensitive. In your example, you'll want to use the following names:
> >
> > User::login()
> >
> > That is, the class name should by "User" in the file "User.php" and the
> > function name for the action should be "login".
> >
> >
> > On Tue, Apr 8, 2008 at 4:12 PM, Bill <[EMAIL PROTECTED]> wrote:
> >
> > > Thanks Bradley. The question is that I only use controllers and
> > > actions in my code, for example:
> > >
> > > 
> > >
> > > Are names of controllers and names of actions case-sensitive?
> > >
> > > Thank you very much
> > >
> > >
> > >
> > > On Tue, Apr 8, 2008 at 1:57 PM, Bradley Holt <
> > > [EMAIL PROTECTED]> wrote:
> > >
> > > > Linux is case-sensitive and Windows is not. This is the most likely
> > > > culprit. Check the case of all your controllers and actions.
> > > >
> > > > On Tue, Apr 8, 2008 at 3:52 PM, xing93111 <[EMAIL PROTECTED]>
> > > > wrote:
> > > >
> > > > >
> > > > > I develop a bunch of code using ZF under XP. On Linux machine, the
> > > > > code
> > > > > cannot find the requested controller and action, but on Windows
> > > > > XP, it can.
> > > > > It seems weired.
> > > > >
> > > > > Thanks
> > > > > --
> > > > > View this message in context:
> > > > > http://www.nabble.com/The-same-code-can-run-on-Windows-but-not-Linux-tp16571585p16571585.html
> > > > > Sent from the Zend Framework mailing list archive at Nabble.com.
> > > > >
> > > > >
> > > >
> > > >
> > > > --
> > > > Bradley Holt
> > > > [EMAIL PROTECTED]
> > > >
> > > >
> > >
> >
> >
> > --
> > Bradley Holt
> > [EMAIL PROTECTED]
> >
> >
>


-- 
Bradley Holt
[EMAIL PROTECTED]


Re: [fw-general] The same code can run on Windows but not Linux

2008-04-08 Thread Bradley Holt
Yes, my understanding is that controller and action names are
case-sensitive. In your example, you'll want to use the following names:

User::login()

That is, the class name should by "User" in the file "User.php" and the
function name for the action should be "login".

On Tue, Apr 8, 2008 at 4:12 PM, Bill <[EMAIL PROTECTED]> wrote:

> Thanks Bradley. The question is that I only use controllers and actions in
> my code, for example:
>
> 
>
> Are names of controllers and names of actions case-sensitive?
>
> Thank you very much
>
>
>
> On Tue, Apr 8, 2008 at 1:57 PM, Bradley Holt <[EMAIL PROTECTED]>
> wrote:
>
> > Linux is case-sensitive and Windows is not. This is the most likely
> > culprit. Check the case of all your controllers and actions.
> >
> > On Tue, Apr 8, 2008 at 3:52 PM, xing93111 <[EMAIL PROTECTED]> wrote:
> >
> > >
> > > I develop a bunch of code using ZF under XP. On Linux machine, the
> > > code
> > > cannot find the requested controller and action, but on Windows XP, it
> > > can.
> > > It seems weired.
> > >
> > > Thanks
> > > --
> > > View this message in context:
> > > http://www.nabble.com/The-same-code-can-run-on-Windows-but-not-Linux-tp16571585p16571585.html
> > > Sent from the Zend Framework mailing list archive at Nabble.com.
> > >
> > >
> >
> >
> > --
> > Bradley Holt
> > [EMAIL PROTECTED]
> >
> >
>


-- 
Bradley Holt
[EMAIL PROTECTED]


Re: [fw-general] The same code can run on Windows but not Linux

2008-04-08 Thread Bradley Holt
Linux is case-sensitive and Windows is not. This is the most likely culprit.
Check the case of all your controllers and actions.

On Tue, Apr 8, 2008 at 3:52 PM, xing93111 <[EMAIL PROTECTED]> wrote:

>
> I develop a bunch of code using ZF under XP. On Linux machine, the code
> cannot find the requested controller and action, but on Windows XP, it
> can.
> It seems weired.
>
> Thanks
> --
> View this message in context:
> http://www.nabble.com/The-same-code-can-run-on-Windows-but-not-Linux-tp16571585p16571585.html
> Sent from the Zend Framework mailing list archive at Nabble.com.
>
>


-- 
Bradley Holt
[EMAIL PROTECTED]


Re: [fw-general] Google App Engine

2008-04-08 Thread Bradley Holt
Wil,

That's great to hear, thanks!

On Tue, Apr 8, 2008 at 1:08 PM, Wil Sinclair <[EMAIL PROTECTED]> wrote:

>  As luck would have it, I have contacts at Google. The guys behind our
> GData component. ;) Generally they've been really great at advocating ZF
> within the company. I'll follow up with Ryan to see if there is a way ZF
> might help with the PHP support.
>
>
>
> ,Wil
>
>
>
> *From:* Bradley Holt [mailto:[EMAIL PROTECTED]
> *Sent:* Tuesday, April 08, 2008 7:48 AM
> *To:* Zend Framework
> *Subject:* [fw-general] Google App Engine
>
>
>
> Has anyone else heard about the new Google App 
> Engine<http://code.google.com/appengine/docs/whatisgoogleappengine.html>?
> It currently only supports Python and the Django web application framework
> but they say, "other programming languages and runtime environment
> configurations are being considered for future releases." Would anyone else
> use this if Google added support for PHP and Zend Framework? If so, is there
> anyone who has a contact within Google who can suggest this idea?
>
> --
> Bradley Holt
> [EMAIL PROTECTED]
>



-- 
Bradley Holt
[EMAIL PROTECTED]


Re: [fw-general] Google App Engine

2008-04-08 Thread Bradley Holt
Sure, support for PHP itself would be great and would be all that's *
technically* required. I guess I was really suggesting two things. First,
that Google App Engine supports PHP and uses Zend Framework as the default
web application framework. Second, components are added to Zend Framework to
support the datastore, Google Accounts, URL fetch and email services in
Google App Engine. It seems like Zend Framework would be a natural fit for
the Google App Engine.

On Tue, Apr 8, 2008 at 10:57 AM, Jake McGraw <[EMAIL PROTECTED]> wrote:

> Technically, support for Zend Framework isn't required, they only need
> to support PHP to get it working. I sat through the demo, looks
> promising as an alternative to Amazon storage services.
>
> - jake
>
> On Tue, Apr 8, 2008 at 10:47 AM, Bradley Holt
> <[EMAIL PROTECTED]> wrote:
> > Has anyone else heard about the new Google App Engine? It currently only
> > supports Python and the Django web application framework but they say,
> > "other programming languages and runtime environment configurations are
> > being considered for future releases." Would anyone else use this if
> Google
> > added support for PHP and Zend Framework? If so, is there anyone who has
> a
> > contact within Google who can suggest this idea?
> >
> > --
> > Bradley Holt
> > [EMAIL PROTECTED]
> >
> >
>



-- 
Bradley Holt
[EMAIL PROTECTED]


[fw-general] Google App Engine

2008-04-08 Thread Bradley Holt
Has anyone else heard about the new Google App
Engine<http://code.google.com/appengine/docs/whatisgoogleappengine.html>?
It currently only supports Python and the Django web application framework
but they say, "other programming languages and runtime environment
configurations are being considered for future releases." Would anyone else
use this if Google added support for PHP and Zend Framework? If so, is there
anyone who has a contact within Google who can suggest this idea?

-- 
Bradley Holt
[EMAIL PROTECTED]


Re: [fw-general] Our new Zend Framework Architect

2008-04-07 Thread Bradley Holt
Congrats Matthew!

On Mon, Apr 7, 2008 at 4:35 PM, Wil Sinclair <[EMAIL PROTECTED]> wrote:

> > Matthew Weier O'Phinney
> > Software Architect   | [EMAIL PROTECTED]
> > Zend - The PHP Company   | http://www.zend.com/
>
> Yikes! I knew there was something I forgot to do on Friday. Without
> further ado, it's my immense pleasure to announce that Matthew has been
> promoted to Software Architect at Zend. I'm sure I don't have to explain
> what he's done to deserve this here. ;)
> He'll still maintain his existing components and develop new components.
> But he'll also be heading up efforts that involve cross-cutting concerns
> with all components. The general consistency of design and quality
> across all components should benefit greatly from his attention.
> In addition, he will be heading up the initiative to define exactly what
> we'll be doing for the 2.0 release. This is of course a critical role as
> we make the right tradeoffs between improvements and backwards
> compatibility.
> Congrats Matthew!
>
> ,Wil
>



-- 
Bradley Holt
[EMAIL PROTECTED]


Re: [fw-general] Comments on Wiki Documentation pages

2008-03-29 Thread Bradley Holt
Simon,

I can't speak for the rest of the wiki content, but I think the QuickStart
is not intended to permanently live on the wiki, but instead under "docs" in
the main framework website. Perhaps other parts of the wiki are also
"works-in-progress" that will find permanent homes elsewhere. In that case,
the comments serve as a nice history to the document but shouldn't be
immediately viewable in the documents final state (when it gets moved).
Perhaps the real issue is that the wiki is being used as a reference tool -
I'm guessing that wasn't its originally intent (but I don't know for sure).
I'm not sure what the solution is if that is the real issue.

On Sat, Mar 29, 2008 at 3:38 PM, Simon Mundy <[EMAIL PROTECTED]>
wrote:

> I'm not convinced of the value of comments on the Wiki documentation
> pages and I was wondering if they should be removed?
>
> Comments are extremely useful during the proposal process, and for
> pages that have a relatively small lifespan. But personally I feel
> that some of the more permanent pages suffer under the weight of
> comments that just don't add any value to the primary content.
>
> Consider the 'Quickstart' page - already it is quite large due to the
> code examples and explanatory text. But over half of the page is now
> taken up with comments that either point out discrepancies (which are
> made redundant the minute the document is revised), double-posts (or
> mistyped posts) that can't be removed by the poster, or one-liners
> that are probably more suited to a mailing list.
>
> Given that the Wiki is now being used as a reference tool more and
> more frequently, I think it would be more productive to restrict work-
> in-progress comments or perhaps run them in parallel on separate pages
> (like A List Apart's separate 'discuss' feature). The commenting
> feature is wonderful when it's used to help community members
> collaborate on a document but can create a lot of confusion and noise
> for those simply coming to grips with the framework.
>
> Does anyone else share this opinion?
>
> --
>
> Simon Mundy | Director | PEPTOLAB
>
> """ " "" """""" "" "" """"""" " "" """"" " """"" "  """""" "" "
>
> 202/258 Flinders Lane | Melbourne | Victoria | Australia | 3000
> Voice +61 (0) 3 9654 4324 | Mobile 0438 046 061 | Fax +61 (0) 3 9654
> 4124
> http://www.peptolab.com
>
>


-- 
Bradley Holt
[EMAIL PROTECTED]


Re: [fw-general] Speeding up Lucene

2008-03-19 Thread Bradley Holt
Are you caching both the open and find functions? I would think you'd need
to cache both.

On Wed, Mar 19, 2008 at 4:13 PM, Eric Marden <[EMAIL PROTECTED]>
wrote:

> > What was the file accessing problem you were having?
>
> Warning: fseek(): supplied argument is not a valid stream resource in
> ...\libraries\Zend\Search\Lucene\Storage\File\Filesystem.php on line 95
>
> Warning: flock() expects parameter 1 to be resource, integer given in
> ...\libraries\Zend\Search\Lucene\Storage\File\Filesystem.php on line 216
>
> It will create the cache file, but when it tries to use it again, I get
> these errors.
>
>
>
>
>
> --
> Eric Marden
>
>


-- 
Bradley Holt
[EMAIL PROTECTED]


Re: [fw-general] Speeding up Lucene

2008-03-19 Thread Bradley Holt
I haven't done this but I don't see any reason why you couldn't simply use
Zend_Cache_Frontend_Class<http://framework.zend.com/manual/en/zend.cache.frontends.html#zend.cache.frontends.class>to
cache the output of your Lucene queries. I don't know if
Zend_Search_Lucene has any built in caching, though.

On Wed, Mar 19, 2008 at 3:30 PM, Eric Marden <[EMAIL PROTECTED]>
wrote:

>  Can you cache Lucene Search Results? Is there another way to speed it up?
>
>
> --
> Eric Marden
> Sr. PHP Developer
>
> *Bonnier Corporation*
> 460 N. Orlando Avenue, Suite 200
> Winter Park, Florida 32789
> www.bonniercorp.com
>
>



-- 
Bradley Holt
[EMAIL PROTECTED]


Re: [fw-general] Zend Framework 1.5 has landed!

2008-03-17 Thread Bradley Holt
In case anyone else
diggs<http://digg.com/programming/Zend_Technologies_Releases_Zend_Framework_1_5>it
too ;-)

On Mon, Mar 17, 2008 at 9:51 AM, Wil Sinclair <[EMAIL PROTECTED]> wrote:

> Well, folks, we made it. Zend Framework 1.5 GA is now released and
> available at the framework site:
>
> http://framework.zend.com/download
>
> And just to remind you once again of all the new features in 1.5:
>
> * New Zend_Form component with support for AJAX-enabled form elements
> * New action and view helpers for automating and facilitating AJAX
> requests and alternate response formats
> * Infocard, OpenID, and LDAP authentication adapters
> * Support for complex Lucene searches, including fuzzy, date-range, and
> wildcard queries
> * Support for Lucene 2.1 index file format
> * Partial, Placeholder, Action, and Header view helpers for advanced
> view composition and rendering
> * New Zend_Layout component for automating and facilitating site layouts
> * UTF-8 support for PDF documents
> * New Nirvanix, Technorati, and SlideShare web services
>
> There are a lot of people to thank, since there are a lot of people who
> worked hard to make this happen. First of all, thanks to all the Zend
> Framework contributors who helped in all kinds of ways to make this a
> truly great, high-quality release. I would personally like to thank the
> Zend Framework team here at Zend for working the long hours this weekend
> to make sure everything came together on Monday morning. There were also
> some very selfless souls in marketing who stayed up late over the last
> few days to make sure the site was at its best in both style and
> substance for the big day. Finally we'd like to thank all the ZF users
> out there who inspire us to continue improving Zend Framework and who
> never fail to keep us on our toes. :) We hope this release not only
> lives up to your high expectations but goes beyond them.
>
> Now we can finally say that we wholeheartedly recommend the 1.5 release
> for production use.
>
> Enjoy ZF 1.5!
>
> ,Wil
>



-- 
Bradley Holt
[EMAIL PROTECTED]


Re: [fw-general] Zend Framework 1.5 has landed!

2008-03-17 Thread Bradley Holt
This is great news! It's amazing how much ZF has matured in such a short
time. A big "thank you" to the whole ZF team!

On Mon, Mar 17, 2008 at 9:51 AM, Wil Sinclair <[EMAIL PROTECTED]> wrote:

> Well, folks, we made it. Zend Framework 1.5 GA is now released and
> available at the framework site:
>
> http://framework.zend.com/download
>
> And just to remind you once again of all the new features in 1.5:
>
> * New Zend_Form component with support for AJAX-enabled form elements
> * New action and view helpers for automating and facilitating AJAX
> requests and alternate response formats
> * Infocard, OpenID, and LDAP authentication adapters
> * Support for complex Lucene searches, including fuzzy, date-range, and
> wildcard queries
> * Support for Lucene 2.1 index file format
> * Partial, Placeholder, Action, and Header view helpers for advanced
> view composition and rendering
> * New Zend_Layout component for automating and facilitating site layouts
> * UTF-8 support for PDF documents
> * New Nirvanix, Technorati, and SlideShare web services
>
> There are a lot of people to thank, since there are a lot of people who
> worked hard to make this happen. First of all, thanks to all the Zend
> Framework contributors who helped in all kinds of ways to make this a
> truly great, high-quality release. I would personally like to thank the
> Zend Framework team here at Zend for working the long hours this weekend
> to make sure everything came together on Monday morning. There were also
> some very selfless souls in marketing who stayed up late over the last
> few days to make sure the site was at its best in both style and
> substance for the big day. Finally we'd like to thank all the ZF users
> out there who inspire us to continue improving Zend Framework and who
> never fail to keep us on our toes. :) We hope this release not only
> lives up to your high expectations but goes beyond them.
>
> Now we can finally say that we wholeheartedly recommend the 1.5 release
> for production use.
>
> Enjoy ZF 1.5!
>
> ,Wil
>



-- 
Bradley Holt
[EMAIL PROTECTED]


Re: [fw-general] Lucene Highlighting

2008-03-10 Thread Bradley Holt
I have yet to use Lucene so my answer will probably sound completely
ignorant. With that disclaimer, is it possible that your document has
changed since the last time you created your index?

On Mon, Mar 10, 2008 at 4:54 PM, Jordan Moore <[EMAIL PROTECTED]>
wrote:

> Has anyone ever had the problem of highlighting being off by a few
> characters?
>
> --
> Jordan Moore
>



-- 
Bradley Holt
[EMAIL PROTECTED]


Re: [fw-general] ZF Packaging

2008-02-05 Thread Bradley Holt
Will,

One of the things I love about Zend Framework is that it is loosely coupled.
Anything that encourages less inter-dependency amongst components (except
where it makes sense) is certainly a good thing. I can definitely see the
marketing benefit as well. As long as I have the option to keep getting my
Zend Framework fix in one whole piece I'm happy ;-)

Thanks,
Bradley

On Feb 5, 2008 2:06 PM, Wil Sinclair <[EMAIL PROTECTED]> wrote:

>  I generally like mootools' and other JS libraries simplistic dependency
> model (AFAIC tell, the core lib is the only dependency allowed, so a
> general-purpose packaging system with tracking across full dependency graphs
> is not necessary). If we were to start distributing parts of ZF in a
> piecemeal fashion, I think that we would also see great benefit from a few
> basic rules aimed at drastically simplifying dependency management. While
> there is no immediate and significant runtime advantage that I can see here,
> we are interested in- and have been discussing- distributing at least one
> 'lean and mean' archive. There are several reasons for this, including lower
> load on our servers and- taking off my perfectly logical developer hat and
> putting on a more realistic marketing hat ;)- the fact that many developers
> and reviewers consider distribution size to be an important dimension on
> which to judge a framework. I don't necessarily think that distribution size
> is a good indication of anything for a server-side framework beyond what you
> **can't** expect to be included, such as sizable locale files which are
> very useful to our many international users but that add a MB or two to the
> current distribution of ZF (Thomas has done an excellent job getting these
> as small as possible while maintaining everything that makes them so useful
> in the first place), but I do think that the 'download only what you need'
> distribution mechanism is both technically and philosophically compatible
> with ZF in its current state. We'll probably be talking about this more once
> 1.5 is out the door.
>
>
>
> ,Wil
>
>
>
> *From:* Bradley Holt [mailto:[EMAIL PROTECTED]
> *Sent:* Tuesday, February 05, 2008 7:04 AM
> *To:* Elliot Anderson
> *Cc:* Simone Carletti; fw-general@lists.zend.com
> *Subject:* Re: [fw-general] ZF Packaging
>
>
>
> Elliot,
>
> The main reason that mootools does this, in my understanding, is so that
> it can give you one JavaScript file to be included in your web page with
> only the components you need. There are performance advantages to this since
> you are only requiring the user's browser to get the JavaScript components
> it will need, not all of mootols. With Zend Framework, there is no
> performance advantage to only installing a handful of components. My
> understanding is that the performance hit comes when you require or include
> the component, not from it simply sitting on your web server. In other
> words, the main advantage of the pick-what-you-want download system doesn't
> apply when it comes to Zend Framework. The only advantage I can see is
> storage space, but have there been any complaints about that with Zend
> Framework?
>
> Thanks,
> Bradley
>
> On Feb 5, 2008 6:26 AM, Elliot Anderson <[EMAIL PROTECTED]> wrote:
>
> I'm a fan of the pick-what-you-want download system that Moo Tools has.
>
> http://mootools.net/download
>
>
>
>
>  On Jan 29, 2008 6:04 AM, Simone Carletti <[EMAIL PROTECTED]> wrote:
>
> On Jan 28, 2008 3:57 PM, Richard Thomas <[EMAIL PROTECTED]> wrote:
>
> zfdev.com is a community supported project that never really took off,
> It was never an "official" repository though.
>
>
>
> Sorry Richard,
> my misunderstanding. :)
>
> Thanks for pointing it out.
>
> Simone
>
>
>
>
>
>
> --
> Bradley Holt
> [EMAIL PROTECTED]
>



-- 
Bradley Holt
[EMAIL PROTECTED]


Re: [fw-general] ZF Packaging

2008-02-05 Thread Bradley Holt
Elliot,

The main reason that mootools does this, in my understanding, is so that it
can give you one JavaScript file to be included in your web page with only
the components you need. There are performance advantages to this since you
are only requiring the user's browser to get the JavaScript components it
will need, not all of mootols. With Zend Framework, there is no performance
advantage to only installing a handful of components. My understanding is
that the performance hit comes when you require or include the component,
not from it simply sitting on your web server. In other words, the main
advantage of the pick-what-you-want download system doesn't apply when it
comes to Zend Framework. The only advantage I can see is storage space, but
have there been any complaints about that with Zend Framework?

Thanks,
Bradley

On Feb 5, 2008 6:26 AM, Elliot Anderson <[EMAIL PROTECTED]> wrote:

> I'm a fan of the pick-what-you-want download system that Moo Tools has.
>
> http://mootools.net/download
>
>
>
>
> On Jan 29, 2008 6:04 AM, Simone Carletti <[EMAIL PROTECTED]> wrote:
>
> > On Jan 28, 2008 3:57 PM, Richard Thomas <[EMAIL PROTECTED]> wrote:
> >
> > > zfdev.com is a community supported project that never really took off,
> > > It was never an "official" repository though.
> > >
> >
> > Sorry Richard,
> > my misunderstanding. :)
> >
> > Thanks for pointing it out.
> >
> > Simone
> >
>
>


-- 
Bradley Holt
[EMAIL PROTECTED]


  1   2   >