zend-framework

zend framework urls and get method

I am developing a website using zend framework. i have a search form with get method. when the user clicks submit button the query string appears in the url after ? mark. but i want it to be zend like url. is it possible? ...

Does Zend Translate auto detect language?

This is my code $locale = new Zend_Locale('en_US'); Zend_Registry::set('Zend_Locale', $locale); $GLOBALS['translate'] = new Zend_Translate( array( 'adapter' => 'array', 'content' => array('Hello' => 'Hi'), 'locale' => 'en_US' ) ); gb('translate')->addTranslation( array( 'content' => array('...

Architectural decisions: main site, forum, blog

I've been consulted with on the setup of a project and would like to bounce my ideas off of someone for extra opinions. The main part of this website is very complex and has very customized functionality, so from what I saw it's more of a webapp. However a blog is needed and also a forum is needed. This is the general overview of this ...

Decode htmlEntities back on populate Zend Form

Hi, I decode my zend-form with htmlEntities. This works great, but I would like to decode the input back when I repopulate the form back to the user. Is there a way to reverse the setElementFilter in Zend? Example: User fills in input field with You & me Data placed in the database: You & me I get the data back from the data...

Configuration and content management with automated deployment tools for ZF based app

I am trying to automate deployments of a particular project and a bit lost as to who to handle config file as well as user assets. (Application is based on Zend Framework based btw). Main application folder is structured as follows: ./app ./config.ini <----- config file ./modules ./controllers ./models ./view...

Using Zend_Paginator without Select Adapter

I want to use Zend_Paginator but Zend_Paginator requires Zend_Db_Select as input parameter. My SQL query is some how a little complicated making it so difficult to implement with Zend_Db_Select. Can i use Zend_Paginator with plain SQL query? ...

Zend Framework: How to inject a controller property from a Zend_Controller_Plugin

I wrote a plugin that needs to set a property on the controller that's currently being dispatched. For example, if my plugin is: class Application_Plugin_Foo extends Zend_Controller_Plugin_Abstract { public function dispatchLoopStartup(Zend_Controller_Request_Abstract $request) { // Get an instance of the current control...

How can i check if a path points to a folder or a file?

I'm building a small class for my zend application (using MVC). This class receive either a folder path or a file path. If its a folder path, i want to list all the files in that folder to make them downloadable. If its a file i want to make a single link to this file to make it downloadable. The file/folder i'm pointing to is /zendAppl...

change a complicated query to Zend_Db_Select object.

I have a query which is a little complicated: (SELECT category_id AS id, content_title AS title, content AS detail, 'content' AS type FROM category_content WHERE $where ORDER BY id DESC) UNION (SELECT news_id AS id, news_title AS title, news_detail AS detail, 'news' AS type FROM news WHERE $where ORDER BY id DESC) How can i chan...

What is wrong with these Zend Framework routes from config file?

I was starting to get a LOT of routes in my bootstrap so I decided to move them to a config file to clean it up. I'm fairly sure I have the syntax correct, but for some reason my route won't work now. Here is my config file: <config> <routes> <indextracking type="Zend_Controller_Router_Route"> <route>crid/:crid</...

How is this PHP encoded?

Does anybody know how this PHP code is encoded? I don't know whether it's Zend, ionCube or something else. <?php if (!function_exists("T7FC56270E7A70FA81A5935B72EACBE29")) { function T7FC56270E7A70FA81A5935B72EACBE29($TF186217753C37B9B9F958D906208506E) { $TF186217753C37B9B9F958D906208506E = base64_decode($TF186217753C37...

Mixing Zend_Db with ORM Classes

Zend has Zend_Db but it's not a full ORM. I already have sections of an app written in a way that uses Zend_Db. I do however want to integrate a full ORM into the application to use it for more complex database operations, but I don't want to have to re-write existing actions that are complete. Those more experienced with Zend Framework...

Zend db adapter mysqli or PDO_MYSQL

I've seen several code samples that do this in application.ini resources.db.adapter = mysqli or resources.db.adapter = PDO_MYSQL What is the real difference between the two? Does it impact my code? when should I choose one or the other? ...

Is registering the autoloader needed zend_loader::registerAutoload()

I'm guessing this line registers the autoload function, which in turn loads needed Zend classes. Zend_Loader::registerAutoload(); My question: is this line meant to be used in applications that call some zend components but aren't fully zend applications? or is needed also in applications that are fully zend and use zend MVC? ...

Zend validators and error messages: addValidator and addErrorMessage

If I have a form element that has multiple validators attached to it (3 in this example), how would I use addErrorMessage to create custom error messages when each unique validator fails. Is there a way to add a custom message for each validator? $element = new Zend_Form_Element_Text()... $element->.... ->addValidator(...) ...

How can i find the sql query statement of insert() in Zend Framework ?

How can i find the sql query statement in Zend Framework for insert(), like its done for db table select's. $select->__toString(). ...

creating zf custom commands, like zf create form

When I use the zend CLI to create a form, like this, a form gets generated and gets added to the forms folder. zf create form MyForm I have a custom class that I'd like to create a custom command for it in the same way and would like to look at the zf create form command for guidance. I suspected it to be in Zend_Framework/bin where t...

url routing in zend framework

Hi I created several module for my own CMS like category, article, core , ... now how can I access these modules with url like: http://localhost/mycms/admin/category http://localhost/mycms/admin/article , ... note: the admin is not module, it's only prefix ...

Flexible routing in Zend

I haven't used the Zend Router much yet so not sure how difficult or easy this is, but I think Zend is flexible so it's got to have a way to do this easily. So I create a controller Cont with 2 actions actone and acttwo. This naturally gives me //the default index controller site.com/ site.com/index/index //and m...

Equivalent of this htaccess for IIS7?

What is the equivalent of these rewrite rules: RewriteEngine On RewriteCond %{REQUEST_FILENAME} -s [OR] RewriteCond %{REQUEST_FILENAME} -l [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^.*$ - [NC,L] RewriteRule ^.*$ /index.php [NC,L] In IIS7? These are rewrite rules for Zend Framework and they work under Apache. I tried importi...