I have a application.ini like this
[production]
phpSettings.display_startup_errors = 1
phpSettings.display_errors = 1
includePaths.library = APPLICATION_PATH "/../library"
bootstrap.path = APPLICATION_PATH "/Bootstrap.php"
bootstrap.class = "Bootstrap"
resources.frontController.moduleDirectory = APPLICATION_PATH "/modules"
resources.mod...
Hi everyone,
I am using Zend_Form and I would like one of my elements to not escape. I have the following code, I think it should not escape but it does without fail:
In form class:
$btc_name = $this->createElement('text','btc_name');
$btc_name->setLabel('Company Name')
->setRequired(true)
->setAttrib('size',4...
Iam rendering a menu (using Zend framework) (zend_navigation)
what iam doing is getting the page as label if the page has the value "myPage"
than then iam setting the new URI with the page as expected
$it = new RecursiveIteratorIterator(
$container, RecursiveIteratorIterator::SELF_FIRST);
foreach ($it as &$page) {
$label = $page...
I'm using
// Ensure library/ is on include_path
set_include_path(implode(PATH_SEPARATOR, array(
dirname(__FILE__) . '/library',
get_include_path(),
)));
in the index.php file, so what does includePaths.library = APPLICATION_PATH "/../library" do? I'd like to remove one of them and I'd prefer keep the line in application.ini, b...
i use zend framework 1.10 and i have a script under scripts library.
i run this script from command line.
how can i load all the models of doctrine and use them in my script.
in the begining of the script i write
/**
* Doctrine CLI script
*/
define('APPLICATION_ENV', 'production');
define('APPLICATION_PATH', realpath(dirname(__FIL...
I'm integrating doctrine with Zend Framework. I've hit an error thrown from cli. It seems Zend_Application_Bootstrap_Bootstrap does not have a require_once for Zend_Application_Bootstrap_BootstrapAbstract. Has anyone hit this?
my cli-config.php
<?php
$classLoader = new \Doctrine\Common\ClassLoader('App', __DIR__ . "/../application/mod...
I'm making somewhat of a "module" that gets included into another unrelated PHP application. In my "module" I need to use sessions. However, I get the 'session has already been started...' exception. The application that my "module" is included into is starting the session. If I cannot disable sessions in this application, what are my op...
I am using Zend_Db with the Pdo_Mysql driver. This query does not give any results:
$s = $db->prepare('SELECT ET.id
FROM elementTypes AS ET, language AS L1
WHERE L1.strId = ET.dispName AND L1.language = ?');
$s->execute(array(2));
pr($s->fetchAll());
If...
Hi i have a lot of common html that i want to use in a layout by doing :
zf enable layout
however the problem is want this layout to be shown on every action apart from the loginAction() that i have created within the controller?
...
I am using Zend_Layout for the layout of my Zend Framework application. It is very simple, but I still have a few operations that I need to do in the layout. For now, the code is included between PHP brackets, but I feel like this is not really the cleanest way to go.
I saw people using plugins, but I don't think this is the way I want ...
Hi all,
I wanted following output from Zend_Form please help
<form ...>
<div class="labels"><b>Name:</b></div>
<input type="text" value="" name="name" class="whitelabelform"><br>
<div class="labels"><b>Email:</b></div>
<input type="text" value="" name="email" class="whitelabelform"><br>
<div class="labels"><b>Security code:</b></div>
<...
Hi
Where is it best to put the code for building my Zend_Forms?
I used to put this logic inside my Controllers, but moved away from that after I needed to use the same form in different places. It meant I had to duplicate the creation of forms in different controllers.
So I moved the form creation code into my Models. Does this seem r...
Hi all,
I'm trying to assign a value to a static class property when defining it:
namespace Base;
abstract class Skeleton {
protected static $entityManager = \Zend_Registry::get("EntityManager");
...
}
When I try to execute this code I get this error:
Parse error: syntax error, unexpected '(', expecting ',' or ';' in /var/w...
I'm developing a website with following structure: click here. And I'm having some problems with the URL when trying to load stylesheets. Being more specific, in the admin module I'm using this bootstrap:
<?php
class Admin_Bootstrap extends Zend_Application_Module_Bootstrap
{
public function _initResources() {
$view = new Z...
iam executing a stored procedure in php and iam returning an array
["record"]=>
array(1175) {
[0]=>
array(20) {
["Col1"]=>
string(1) "Mode"
["col2"]=>
string(16) "type"
}
}
how do i get the col1 and col2 values from the array and assign it to the view
.what should i ...
Okay. I'm building a CMS with Zend. It isn't as simple as it looked but still — the best solution for me. I have a tree system with ID and PARENT, PARENT marks under which page the child resides. Anyway. Simple stuff.
Every time a page is created or sorted Nav & Routes are regenerated.
I'll copy the whole Admin_Pages_Model code for cre...
I'm trying to integrate the doctrine2 sandbox with a default Zend Framework App. When I try to use namespacing in the controller I get an 'Invalid controller class ("IndexController")' error
This Works:
use Entities\User, Entities\Address;
class IndexController extends Zend_Controller_Action
{
...
}
This does not (but should?):
na...
Hi guys
I would like to learn zend framework, I haven't done any projects in ZF. Could you please let me know some useful urls which explain how to start with ZF with a few examples
Thank you guys
...
I have thi next code, but he doesn't work:
$select_sell = $this->select();
$select_sell->from($this->_name, array('rank_id'))
->where('rank_id = ?', $id)
->where('type = ?', 'must_sell');
$result = $this->fetchAll($select_sell)->count();
I need to make this query ... WHERErank_id= $id ANDtype= 'must_sell'..
Th...
Method __call is running when come call to undefined method. I need to trigger when calling any existing method in class, something like __callAll.
The simpliest approach would be calling the method in every method, but I don't like this approach. The uses Zend framework.
Please advise me how to do it?
...