[fw-general] Why $form->getValue() is not working?

2009-02-06 Thread Deepak Shrestha
Hi, I am trying to implement a simple search function. For the test purpose I am trying to display the search string in my view. This is how it looks like: my form -- class Form_Search extends Zend_Form { public function init() { //create search text input

Re: [fw-general] How to store attachment files into a location in server

2009-02-06 Thread phpbrat
Hi Anees, i want to download attachment from a pop3/imap mail account using Zend framework .. Can you please help me with this ? the script flow.. Thanks in advance. Brat Anees wrote: > > > > Anees wrote: >> >> >> $fh = fopen($name,'w') or die("can't open file"); >> fwrite($fh,$content)

[fw-general] Zend_form with viewscript and subform

2009-02-06 Thread Michel Morelli
Hi all. I have configurated ZF to work with module (addModulePath at the bootstrap). Now, I have a working form with viewscript decorator (module 'user'): $this->setAction('ACTION') ->setMethod('post') ->setName('newUser') ->setDecorators( array( array('ViewScript',

Re: [fw-general] How to store attachment files into a location in server

2009-02-06 Thread Anees
Hi am just including the core part of the attachment saving 'mail.mailserver.com','user'=>'u...@server.com','password'=>'pass123')); //This foreach loop is using to saperate each message as the number of messages $msg= 0;

Re: [fw-general] Why $form->getValue() is not working?

2009-02-06 Thread PHPScriptor
Try this: $this->getPost('qsearch'); Deepak Shrestha wrote: > > Hi, > > I am trying to implement a simple search function. For the test > purpose I am trying to display the search string in my view. This is > how it looks like: > > my form > -- > class Form_Search ext

Re: [fw-general] Zend_Paginator and Action helper (or Actionstack)

2009-02-06 Thread Marko Korhonen
Hi, I did some reading and testing and here are my results (which worked for me) and I hope someone else finds this useful: Here are 3 different ways to add paginator partial: 1. Named route paginationControl($this->paginator, "Sliding", "pagination_controls.phtml", array("route" => "userchan

[fw-general] Zend_Form INI config documentation

2009-02-06 Thread Joó Ádám
Is there any thorough documentation on the configuration options of Zend_Form provided by the INI config interface? Thanks, Ádám

Re: [fw-general] Why $form->getValue() is not working?

2009-02-06 Thread Deepak Shrestha
On Fri, Feb 6, 2009 at 7:01 PM, PHPScriptor wrote: > > Try this: > > $this->getPost('qsearch'); > It gives me: = Application error Exception information: Message: Method "getPost" does not exist and was not trapped in __call() === Trying $request->getPost('qsearc

Re: [fw-general] Getting Text from a PDF

2009-02-06 Thread Jonathan Maron
Hello Matthias If you are running Linux, have you considered 'pdftotext'? http://linux.die.net/man/1/pdftotext If would be trivial to shell out using exec() and convert the text that way. If you choose this route, it is very important to ensure all parameters being sent to exec() have not been

[fw-general] including an array with require_once failed at second testcase

2009-02-06 Thread donbosco
Hello, ive tried to setup a testcase which tests the same controller and action twice. The first run seems to be okay but the second run fails. The error seems to be somewhere here pubic function existInFile () { $blacklist = require_once $config->general->language . '/blacklist.php', // output

[fw-general] Zend_Form: strange values returned from getValues().

2009-02-06 Thread Michel Morelli
Hi all. I have this form (rendering works): function init() { $this->_db = Zend_Registry::get('db'); $method = isset($this->_options['method']) ? $this->_options['method'] : 'post'; $name = isset($this->_options['name']) ? $this->_options['name'] : 'newCompany';

Re: [fw-general] Getting Text from a PDF

2009-02-06 Thread Matthias Buesing
Hi Jonathan, I found pdftohtml which is exactly what I've been searching for. Thank you very much. Matthias Jonathan Maron schrieb: > Hello Matthias > > If you are running Linux, have you considered 'pdftotext'? > > http://linux.die.net/man/1/pdftotext > > If would be trivial to shell out us

[fw-general] Re: Zend_Form INI config documentation

2009-02-06 Thread Joó Ádám
Found this: http://www.vayanis.com/2008/03/17/using-zend_form-with-zend_config/ Not much, but more than nothing. Ádám

Re: [fw-general] Why $form->getValue() is not working?

2009-02-06 Thread PHPScriptor
I'm assuming that if your method "getPost" does not exist that your $request->isPost() and isValid($request->getPost()) will also not work. Try to do a var_dump of $request->getPost(); and your $request. Deepak Shrestha wrote: > > On Fri, Feb 6, 2009 at 7:01 PM, PHPScriptor > wrote: >> >> Try

[fw-general] Re[fw-general] writeRule and matching to Controller

2009-02-06 Thread retoreto
Hi, I'm trying to accomplish that one controller has another "Cache-Control"-header than the rest of the site. So I'm trying to do this in the apache-config. I have the RewriteRule to index.php with the "no caching" set: RewriteEngine on RewriteCond %{REQUEST_URI} !^/index\.php$ Rewri

Re: [fw-general] Overwriting a default view helper

2009-02-06 Thread Ruben D.
Jason Austin wrote: > > When I create a > My_View_Helper_Translate it will ignore my helper in favor of the > default one. Any idea how to make the view helper use my translate > helper as opposed to the default one? > I had exactly the same problem. I solved this as follows. Put this in

[fw-general] Form Filter for converting to database IDs

2009-02-06 Thread Colin J
Hi I was wondering whether it was appropriate/possible to use a filter on a form element to convert the data into a database ID before passing to the model. For example, an input text field for car manufacturer where the user types 'Ford' or 'Honda' etc. and a filter can run to convert this into

Re: [fw-general] Why $form->getValue() is not working?

2009-02-06 Thread Deepak Shrestha
On Fri, Feb 6, 2009 at 10:43 PM, PHPScriptor wrote: > > I'm assuming that if your method "getPost" does not exist that your > $request->isPost() and isValid($request->getPost()) will also not work. Try > to do a var_dump of $request->getPost(); and your $request. > Hi, I agree with you on this.

Re: [fw-general] Why $form->getValue() is not working?

2009-02-06 Thread PHPScriptor
It's not the best way but you can do it like this maybe: $data = $request->getPost(); echo $data['qsearch]; Just to help you further for this moment... I'll have a closer look later on... Deepak Shrestha wrote: > > On Fri, Feb 6, 2009 at 10:43 PM, PHPScriptor > wrote: >> >> I'm assuming that

[fw-general] Getting Text from a PDF

2009-02-06 Thread Matthias Buesing
Hello, is there any way to get the Text from inside of a PDF with Zend_PDF? Or does anybody know a _free_ tool to do this? Greetings Matthias

[fw-general] Saving a new comment by an article

2009-02-06 Thread Derk
There are two tables involved articles - id - title - text comments - name - comment - article_id Now I have a form by an article, so users can post comments The code is quite simple... public function showAction() { $articlesTable = new Articles; $article

[fw-general] SubForm validate() function is not called

2009-02-06 Thread Michel Morelli
Hi all: I have a form with a form, that have own private() and own isValid() function. Now I have a form that include the first form like a subform. Why the private() and isValid() function of the first form (now subform) is not called ? When I "include" a form like a subform I include only th

Re: [fw-general] Why $form->getValue() is not working?

2009-02-06 Thread A.J. Brown
Hi, It looks like you're not setting post as the method. $form->setMethod( 'post' ); $this->view->form = $form; On Fri, Feb 6, 2009 at 9:22 AM, PHPScriptor wrote: > > It's not the best way but you can do it like this maybe: > > $data = $request->getPost(); > echo $data['qsearch]; > > Just to h

[fw-general] stdClass Question

2009-02-06 Thread A.J. Brown
Hey guys, This is probably more approriate for the PHP list, but I'm not subscribed with this email address, so I'll pose it here. Is there a better / built in way to turn an array into a stdClass? //TODO (is there / why isn't there) a built in way to do this? $oTrack = new stdClass(); foreach(

Re: [fw-general] stdClass Question

2009-02-06 Thread Josh Team
function array2Obj($array, $obj = null) { if (is_null($obj)) { $obj = new stdClass(); } foreach ($array as $key => $value) { if (is_scalar($value)) { $obj->$key = $value; } else if (is_array($value)) { if (isset($value[0])) {

Re: [fw-general] stdClass Question

2009-02-06 Thread A.J. Brown
That's not exactly what I was thinking :) I was hoping there was something built-in that I was missing :-/ On Fri, Feb 6, 2009 at 10:25 AM, Josh Team wrote: > function array2Obj($array, $obj = null) > { > if (is_null($obj)) > { > $obj = new stdClass(); > } > > foreach (

RE: [fw-general] stdClass Question

2009-02-06 Thread Michael Tramontano
What you have there works fine, is simple, and is relatively quick so I'm not sure why you're looking for something built-in. That being said, an alternative is to make a class that simply copies the array to a private variable, and uses the magic __get and __set functions for access outside of

RE: [fw-general] stdClass Question

2009-02-06 Thread Michael Tramontano
Here is a useful post with comments regarding array to object conversion... http://www.lost-in-code.com/programming/php-code/php-array-to-object/ Mike Tramontano From: Michael Tramontano [mailto:mtramont...@efashionsolutions.com] Sent: Friday, February 06, 2009 12:44 PM To: a...@ajbrown.or

Re: [fw-general] stdClass Question

2009-02-06 Thread Ralph Schindler
Another option: $items = array(); // this could be any set of data or null $oTrack = new ArrayObject($items, ArrayObject::ARRAY_AS_PROPS); That would give you access to this kind of functionality: http://www.php.net/~helly/php/ext/spl/classArrayObject.html -ralph On 2/6/09 11:43 AM, "Michael

[fw-general] Does Zend_Search_Lucene_Search_QueryParser just... er... not work?

2009-02-06 Thread Matthew Ratzloff
I was under the impression that the QueryParser class parsed a query and, if there were no exceptions, returned an object that, when converted to a string, would return a working query. This seems to not be the case: -- #!/usr/bin/ph

[fw-general] formCheckbox() breaks javascript in IE

2009-02-06 Thread Mark Wright
So we have a checkbox created in a view script with $this->formCheckbox(). There is a javascript that is called when the form is submitted to verify that the checkbox is checked but in IE the script always sees the form as unchecked, even when it is checked. This is the case when using document.get

Re: [fw-general] stdClass Question

2009-02-06 Thread Brad Griffith
If we're just talking about an stdClass, can't you do: $array = (array) $myStdClass; And in the other direction: $object = (object) $myArray; On Fri, Feb 6, 2009 at 11:46 AM, Ralph Schindler wrote: > Another option: > > $items = array(); // this could be any set of data or null > $oTrack =

[fw-general] Zend_Amf dependencies

2009-02-06 Thread Josh Team
anyone know where I can see the dependent packages for running Zend_Amf? thanks.

[fw-general] SQL Case statement in Zend Framework

2009-02-06 Thread rsanaie
Hi all, I'm trying to have a case statement in my SQL select , but ZF is not allowing me, any suggestions: Here's my code: $select = $this->select()->setIntegrityCheck(false); $select->from('car',array( 'car_id' => 'car_id', 'car_name'=> 'car_name',

Re: [fw-general] SQL Case statement in Zend Framework

2009-02-06 Thread Brad Griffith
It's failing because you're quoting entire CASE statement. Doing so makes the SQL interpreter assume your CASE statement is actual a column name on the "parking" table. If you remove the call to $db->quote() altogether, though, that won't be enough to fix it. You need to remove that call and the

Re: [fw-general] SQL Case statement in Zend Framework

2009-02-06 Thread rsanaie
Hey Brad, Thanks for your quick response, I guess I should've looked into the "Zend/Db/Select.php" earlier before asking the question here! :) Yes putting the () around the statement does the job (I had put the db->quote() later on as I was trying to figure out how to get it working) Thanks aga

[fw-general] Zend_Validate Zend_Filter and Ini's

2009-02-06 Thread Bob O
I am stumped, if anyone can point me in a good direction where i can find solid docs on using Zend validation and filters from an ini file that would be super..Im not a Zend Guru, so sometimes deciphering what is being presented is frustrating. This is my code that is barfing on me. its mainly bu

Re: [fw-general] Zend_Loader_PluginLoader_Exception' with message 'Plugin by name 'PluginName' was not found in the registry

2009-02-06 Thread OXiGEN
Note that a leading slash in the path variable can also trigger this error: $this->view->addHelperPath('/My/Helper/', 'My_Helper'); //error $this->view->addHelperPath('My/Helper/', 'My_Helper'); //valid This can get confusing as the http://framework.zend.com/manual/en/zend.view.helpers.html doc

Re: [fw-general] including an array with require_once failed at second testcase

2009-02-06 Thread Matthew Weier O'Phinney
-- donbosco wrote (on Friday, 06 February 2009, 05:52 AM -0800): > > Hello, > > ive tried to setup a testcase which tests the same controller and action > twice. The first run seems to be okay but the second run fails. > The error seems to be somewhere here > > pubic function existInFile () > {

Re: [fw-general] stdClass Question

2009-02-06 Thread Matthew Weier O'Phinney
-- A.J. Brown wrote (on Friday, 06 February 2009, 10:24 AM -0700): > Hey guys, > > This is probably more approriate for the PHP list, but I'm not subscribed with > this email address, so I'll pose it here. > > Is there a better / built in way to turn an array into a stdClass? > > //TODO (is the

Re: [fw-general] Zend_Amf dependencies

2009-02-06 Thread Matthew Weier O'Phinney
-- Josh Team wrote (on Friday, 06 February 2009, 01:13 PM -0600): > anyone know where I can see the dependent packages for running Zend_Amf? Zend_Amf_*, Zend_Server_Reflection_*, Zend_Loader, and Zend_Server_Interface for sure; not sure if any others are used. -- Matthew Weier O'Phinney Softwar

Re: [fw-general] Does Zend_Search_Lucene_Search_QueryParser just... er... not work?

2009-02-06 Thread Matthew Ratzloff
Hahaha That query was inspired by a dating app we built. But I would think that it would parse any legitimate query. CCing to the list. -Matt On Fri, Feb 6, 2009 at 1:28 PM, Jurriën Stutterheim wrote: > Zend_Search_Lucene is probably not the best way to get a date > If I recall correctly t

[fw-general] Getting JSON data in ComboBox gives error

2009-02-06 Thread sktib
Hello Folks, I am working on XP with Zend 1.7.1. I am trying to get data from Database into a Dojo Combobox on my form - transfering the data using JSON. I have the following Javascript on my phtml dojo.addOnLoad(function(){ var pfStore = new dojo.data.ItemFileReadStore({url: "/test/gam

Re: [fw-general] Zend_Amf dependencies

2009-02-06 Thread Josh Team
Thanks so much Matthew. On Fri, Feb 6, 2009 at 4:03 PM, Matthew Weier O'Phinney wrote: > -- Josh Team wrote > (on Friday, 06 February 2009, 01:13 PM -0600): > > anyone know where I can see the dependent packages for running Zend_Amf? > > Zend_Amf_*, Zend_Server_Reflection_*, Zend_Loader, and > Z

[fw-general] Data Enums

2009-02-06 Thread Kostyantyn Shakhov
Often projects require a set of specific data enums like countries, provinces, different statuses for the database etc. I would like these enums satisfy the following requirements: 1) Each enum must be an object 2) Each enum object must be iteratable and countable 3) Each enum item must be accessi

[fw-general] Securing Zend_Amf Request

2009-02-06 Thread Josh Team
I've set up a layer with Zend_Amf and Doctrine to allow Flash to request models via DQL. This opens me up to security vulnerabilities, so I was wondering are there ways to locking down / securing the request & response w/ Zend_Amf. Maybe using credentials in the header? Anyone work with this before

Re: [fw-general] Getting JSON data in ComboBox gives error

2009-02-06 Thread sktib
I played around with the Json a little and realized that if I change the Json to { identifier: 'id', items:[{"id":"1","name":"XBox"},{"id":"2","name":"XBox 360"},{"id":"3","name":"Sony PSP"},{"id":"4","name":"Playstation 3"},{"id":"5","name":"Playstation 2"},{"id":"6","name":"PC Games"},{"id":"

Re: [fw-general] Why $form->getValue() is not working?

2009-02-06 Thread Deepak Shrestha
>Hi, >It looks like you're not setting post as the method. >$form->setMethod( 'post' ); >$this->view->form = $form; The form's method is set to post now (sorry I forgot; my bad) but I am still getting the same result. >It's not the best way but you can do it like this maybe: >$data = $request-