We are working on a new zend framework project and most things are going fine with the bootstrap:
<?php
class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
{
protected function _initAutoload()
{
$autoloader = new Zend_Application_Module_Autoloader(array(
'namespace' => 'List8D',
'basePat...
Hi,
I am learning Zend Framework recently. I followed zend framework quickstart and...it was great. One thing I did not like was using .ini file to set bootstrap path, class, and other things.
Is it possible to set configurations using code only? I googled it, but no luck.
...
Hello. I recently upgraded my zend framework install from 1.7 -> 1.9. Everything was working prior to the upgrade. I've managed to correct all issues except this particular one.
My problem is this. When calling values form a zend_config _ini object the standard 'Setting=Value' scheme works, as long as the setting is not an integer. I...
Hi,
I am playing with zend framework's MVC. One thing I found out is that Zend Framework tries to include a view script whenever a controller is called. I can disable it in bootstrap with the following code.
$frontController->setParam('noViewRenderer',true);
However, I have to initialize Zend_View class in a controller method then ren...
I would like to make a global Zend_Log object that I can reach from my Controllers and my Models.
What should I add to my Bootstrap? (My bootstrap extends Zend_Application_Bootstrap)
How then can I reach the logger object from my controller actions and from my model?
...
In my app I use Zend_Date. I have set date_default_timezone_set('UTC') because internally and in the database I only want to have UTC times.
For users I want to display it in their local time. What is the easiest way to do this? Let's say, I have in the view $user->timezone and $date, where $timezone is 'Europe/Helsinki' and $date is a...
I have installed a Zend Framework application in a subfolder, something like this:
www.mydomain.com/temp/zend-application/
Now the problem is all stylesheets, javascript files and also all links use relative paths, such as:
/css/styles.css
/js/jquery.js
/controller/action
And these go to the main domain like this:
www.mydomain.com...
I have an action which is rendering some content via a layout.
I actually want to send this output in an email. What is the best way to achieve this in the Zend Framework?
I know I need to use the Zend_Mail component to send the email, but I'm unclear about how to attach the output of my action to Zend_Mail.
I've done some reading on ...
First my code:
class ProfileController extends Zend_Controller_Action {
private function getUploadAvatarForm()
{
$form = new Zend_Form;
$form->setAttrib('enctype', 'multipart/form-data');
$form->setAction($this->view->baseUrl('/profile/upload-avatar'))
->setName('uploadAvatarForm')
->setMethod('POST');
...
Hi,
I'm connecting to SQL Server using the Zend_Db_Adapter_Sqlsrv via SQL Server driver for PHP
Wondering how I can insert a date which is read in from a web form in format dd/mm/yyyy into a datetime column
Thanks in advance
...
I'm building a query and using "execute" for a multiple insert like :
$sql='INSERT INTO tablename (col1, col2, col3) VALUES (?, ?, ?), (?, ?, ?)'
$stmt = $contactsTable->getAdapter()->prepare($sql);
$stmt->execute();
It all works fine if all the data is not empty, but if some values are empty, I get an error like this:
Message: SQLST...
I have a PHP application that uses Zend Framework, jQuery's ajax, and Zend_Session. This application has been around for about 7 months and working the way it should. When the application initializes after the user logs in, about 10 ajax requests are fired off to load up relevant data to a dashboard type page. After those have requests h...
On zend framework inside my bootstrap file i have the following code:
$frontController = Zend_Controller_Front::getInstance();
try
{
$front->dispatch();
}
catch (Exception $e)
{
echo "Something wrong happen";
}
Instead the ugly message i want to redirect to a custom controller... how can i do that if i can not use $frontC...
I'm using the 'modules' front controller resource for the project setup.
What's the best approach to render site-wide elements, like navigation?
Add the action which renders the element to the end of the action stack each request?
is it OK to render these elements through controller actions?
Create a plugin which renders the element?...
I want to change the advanced search layout to my needs.
Instead of select boxes I want to have radio buttons with a picture and text in the description. For one button the layout is:
[button][image][text]
Thank you,
Ivo Trompert
...
Hey everyone!
I've created a function that consumes an RSS feed from Flickr using Zend_Feed.
Unfortunately I am struggling to extract some keys!
I can get the < title > and such by echoing
$entry->title();
But how can I echo out something like < media:thumbnail >?
I'm sure there's a completely simple way of doing this but I can't f...
First, let me apologize for Yet Another Framework Question. But I think this is different enough from the usual "What framework should I choose?" to warrant it.
Here's my situation: For the past year I've been using a custom framework. It's been used on everything from small CMS's to larger sites and even a mid sized social network. It'...
I have implemented Zend_Navigation, Zend_Translate in my application.
The routing is setup in Bootstrap.php like below.
$fc = Zend_Controller_Front::getInstance();
$zl=new Zend_Locale();
Zend_Registry::set('Zend_Locale',$zl);
$lang=$zl->getLanguage().'_'.$zl->getRegion();
$router = $fc->getRouter();
$route = ne...
I have all the menu items in a Zend Navigation Container.
I'm displaying the breadcrumb via Zend's breadcrumb helper.
When I visit one of the menu items, it's displaying the breadcrumb correctly. However, if I have a page which doesn't occur in the Navigation Container, it doesn't show a breadcrumb, which makes sense. But I do want to s...
Hi there,
my question is simple:
How do I add an API and/or 3rd party
library to my ZendFramework
application in a way which makes it
possible to access it in a
controller
...