Search Results

Search found 156 results on 7 pages for 'zf'.

Page 1/7 | 1 2 3 4 5 6 7  | Next Page >

  • zend framework version trouble

    - by sasori
    Hi, am 100% sure I downloaded and extracted version 1.8 of ZF, but then when I go to console and typed "zf show version" it says am using 1.9.6, yes I do have 1.9.6 but it is "Compressed" and untouched, how could this be possible ?, I double checked my system variables, there's no evidence of ZF there. I also checked my php.ini file, it's pointed to the location of the extracted 1.8 ZF.. please help. this is my first attempt in using ZF

    Read the article

  • ZF Site in ZF Site? How do I redirect form subdirectory to another subdirecotry?

    - by AD
    The deal is that I have a ZF site for which root directory is /public. How should I go about redirecting to a subdirectory if I want to do next? I want to have another subdirectory under /public/ that would not be linked to a main website in any way except it using save ZF. Lets say I have this: /public/newsite/ which will include a complete modular ZF (just I have it for the main site). That is the root directory for the NEWSITE would be /public/newsite/public. So my question how do I modify my .htaccess rules so it would redirect any requests from /public/newsite/ to /public/newsite/public/? Thank you in advance.

    Read the article

  • ZF Autoloader to load ancestor and requested class

    - by Pekka
    I am integrating Zend Framework into an existing application. I want to switch the application over to Zend's autoloading mechanism to replace dozens of include() statements. I have a specific requirement for the autoloading mechanism, though. Allow me to elaborate. The existing application uses a core library (independent from ZF), for example: /Core/Library/authentication.php /Core/Library/translation.php /Core/Library/messages.php this core library is to remain untouched at all times and serves a number of applications. The library contains classes like class ancestor_authentication { ... } class ancestor_translation { ... } class ancestor_messages { ... } in the application, there is also a Library directory: /App/Library/authentication.php /App/Library/translation.php /App/Library/messages.php these includes extend the ancestor classes and are the ones that actually get instantiated in the application. class authentication extends ancestor_authentication { } class translation extends ancestor_translation { } class messages extends ancestor_messages { } usually, these class definitions are empty. They simply extend their ancestors and provide the class name to instantiate. $authentication = new authentication(); The purpose of this solution is to be able to easily customize aspects of the application without having to patch the core libraries. Now, the autoloader I need would have to be aware of this structure. When an object of the class authentication is requested, the autoloader would have to: 1. load /Core/Library/authentication.php 2. load /App/Library/authentication.php My current approach would be creating a custom function, and binding that to Zend_Loader_Autoloader for a specific namespace prefix. Is there already a way to do this in Zend that I am overlooking? The accepted answer in this question kind of implies there is, but that may be just a bad choice of wording. Are there extensions to the Zend Autoloader that do this? Can you - I am new to ZF - think of an elegant way, conforming with the spirit of the framework, of extending the Autoloader with this functionality? I'm not necessary looking for a ready-made implementation, some pointers (This should be an extension to the xyz method that you would call like this...) would already be enough.

    Read the article

  • Register view_helper zf 1.10.3

    - by Alexandr
    I create my view helper it located in /library/My/View/helpers/SpecialPurpose.php the class name is My_View_Helper_SpecialPurpose it have public function specialPurpose() it return some HTML i register this path in bootstrap.php $view = Zend_Layout::getMvcInstance()-getView(); $view-addBasePath('/my/view/helpers',"My_View_Helper"); when i tring specialPurpose();? in any view .phtml it trow exeption Message: Plugin by name 'SpecialPurpose' was not found in the registry; used paths: My_View_Helper_Helper_: /my/view/helpers\helpers/ Zend_View_Helper_: Zend/View/Helper/;D:/WWW/zends/application/modules/default/views\helpers/ P.S I read many post in stackoverflow but not one solutions not helped If it possible weácan how do this task with bootstrap and application.ini zf version 1.10.3

    Read the article

  • page not show after issuing zf command

    - by Nazmin
    hello guys, just simple question, recently i have setup a web server to build project using zend framework, after setup and see those welcome page saying that you are creating websites powered by zendframework, then i try issuing command, $ zf create controller alert i get the message that saying that i've successfully create controller, view and so on, but when i try to navigate to the page by URL, ex: www.mywebapp.com/alert the page is broken, i've check those tuts but none of them showing this case. can some one define which step i've skip? update: (25/5/2010) so i've found that there is no problem, is just that i've not configured properly my route to my web apps, so i have to type URL like this: www.mywebapp.com/index.php/alert how am I going to change this? i mean i want to explode "index.php" out of URL.

    Read the article

  • Is it safe to develop for older versions of Zend Framework?

    - by RenderIn
    Our vendor-supported server's O/S only supports PHP 5.1.6, which limits us to ZF 1.6. The current version of Zend Framework requires a higher version of PHP. We're struggling to decide whether to adopt ZF because of this incompatibility. Is it feasible to develop (indefinitely) in these older versions of ZF or should we hold off? Features, security, bugs, etc. Is this a path we don't want to go down or are these older versions perfectly usable in a production environment?

    Read the article

  • ZF: Form array field - how to display values in the view correctly

    - by Wojciech Fracz
    Let's say I have a Zend_Form form that has a few text fields, e.g: $form = new Zend_Form(); $form->addElement('text', 'name', array( 'required' => true, 'isArray' => true, 'filters' => array( /* ... */ ), 'validators' => array( /* ... */ ), )); $form->addElement('text', 'surname', array( 'required' => true, 'isArray' => true, 'filters' => array( /* ... */ ), 'validators' => array( /* ... */ ), )); After rendering it I have following HTML markup (simplified): <div id="people"> <div class="person"> <input type="text" name="name[]" /> <input type="text" name="surname[]" /> </div> </div> Now I want to have the ability to add as many people as I want. I create a "+" button that in Javascript appends next div.person to the container. Before I submit the form, I have for example 5 names and 5 surnames, posted to the server as arrays. Everything is fine unless somebody puts the value in the field that does not validate. Then the whole form validation fails and when I want to display the form again (with errors) I see the PHP Warning: htmlspecialchars() expects parameter 1 to be string, array given Which is more or less described in ticket: http://framework.zend.com/issues/browse/ZF-8112 However, I came up with a not-very-elegant solution. What I wanted to achieve: have all fields and values rendered again in the view have error messages only next to the fields that contained bad values Here is my solution (view script): <div id="people"> <?php $names = $form->name->getValue(); // will have an array here if the form were submitted $surnames= $form->surname->getValue(); // only if the form were submitted we need to validate fields' values // and display errors next to them; otherwise when user enter the page // and render the form for the first time - he would see Required validator // errors $needsValidation = is_array($names) || is_array($surnames); // print empty fields when the form is displayed the first time if(!is_array($names))$names= array(''); if(!is_array($surnames))$surnames= array(''); // display all fields! foreach($names as $index => $name): $surname = $surnames[$index]; // validate value if needed if($needsValidation){ $form->name->isValid($name); $form->surname->isValid($surname); } ?> <div class="person"> <?=$form->name->setValue($name); // display field with error if did not pass the validation ?> <?=$form->surname->setValue($surname);?> </div> <?php endforeach; ?> </div> The code work, but I want to know if there is an appropriate, more comfortable way to do this? I often hit this problem when there is a need for a more dynamic - multivalue forms and have not find better solution for a long time.

    Read the article

  • Module autoloader in ZF

    - by ChrisRamakers
    The manual on Zend_Application_Module_Autoloader states the following: When using module bootstraps with Zend_Application, an instance of Zend_Application_Module_Autoloader will be created by default for each discrete module, allowing you to autoload module resources. Source: http://framework.zend.com/manual/zh/zend.loader.autoloader-resource.html#zend.loader.autoloader-resource.module This requires me to create an empty bootstrap class for each of my modules or else resource autoloading per module won't work with the build-in autoloader. Now I have two questions What is a discrete module? Is there a way to have this resource autoloader registered by default for each module without the need to create a bootstrap file for each module? I want it available in each module and creating so many empty bootstrap classes is something i'd rather prevent.

    Read the article

  • Handling one-to-many relationship with ZF partialLoop

    - by snaken
    Lets say i'm listing musical artists, each artist has basic information like Name, Age etc. stored in an artist table. They also have entries in an Albums table (album name/album cover etc), referencing the artist table using the artist id as a foreign key. I have the Model_Artist (Artist.php) file: class Model_Artist extends Zend_Db_Table_Abstract { protected $_name = 'artist'; protected $_dependentTables = array('Model_ArtistAlbums'); public function fetchArtistss() { $select = $this->select(); return $this->fetchAll($select); } } and to the Model_ArtistAlbums (ArtistAlbums.php) file class Model_ArtistAlbums extends Zend_Db_Table_Abstract { protected $_name = 'albums'; protected $_referenceMap = array( 'Artists' => array( 'columns' => 'alb_art_id', 'refTableClass' => 'Model_Artist', 'refColumns' => 'art_id' ) ); // etc } in my controller: public function indexAction() { /* THIS WORKS $art = new Model_Artist(); $artRowset = $art->find(1); $art1 = $artRowset->current(); $artalbums = $art1->findDependentRowset('Model_ArtistAlbums'); foreach($artalbums as $album){ echo $album->alb_title."<br>"; } */ $arts = new Model_Artist(); $this->view->artists = $arts->fetchArtists(); } in the view file: $this->partial()->setObjectKey('artist'); echo $this->partialLoop('admin/list-artists.phtml', $this->artists); but with this code in artists/list-artists.phtml: foreach($this->artist->findDependentRowset('albums') as $album): // other stuff endforeach; i get this error: Fatal error: Call to a member function findDependentRowset() on a non-object A var_dump of $this->artist = NULL.

    Read the article

  • problem in jquery notify bar on submit form using php or zf

    - by user1400
    hi guys in my application on zend framework i use of 'jQuery Notify Bar' plugin for display messages, i'd like to show message when my form submit ,the other page is opened and notify bar be open until the other page is completely load and even some second more but the problem is that notify bar show for short Moment and when the other page begin to load , notify bar is closed, and the delay property is not effect to that $('#myForm').submit(function(){ $.notifyBar({ html: "Thank you, your settings were updated!", **delay: 20000,** animationSpeed: "normal" }); how to show notify bar in the other page too? thanks

    Read the article

  • PHP ZF: I can't debug my IndexController.php actions code

    - by overthetop
    Hi I'm new to php and I'm using xampp, eclipse pdt, xdebug. I've set xdebug so that I can debug my site on apache but when I click 'debug as web page' in the eclipse ide only the breakpoint in the public/index.php and in the views get hit. If I put a breakpoin here public function indexAction() { // action body $this->view->s = "deam"; } the debugger don't stop?! why is that? I can't debug the most important part of my application. :( Plese help me with this.

    Read the article

  • ZF-Autoloader not working in UnitTests on Ubuntu

    - by Sam
    i got a problem regarding Unit-testing a Zend-Framework application under Ubuntu 12.04. The project-structure is a default zend application whereas the models are defined as the following ./application ./models ./DbTable ./ProjectStatus.php (Application_Model_DbTable_ProjectStatus) ./Mappers ./ProjectStatus.php (Application_Model_Mapper_ProjectStatus) ./ProjectStatus.php (Application_Model_ProjectStatus) The Problem here is with the Zend-specific autoloading. The naming convention here appears that the folder Mappers loads all classes with _Mapper but not _Mappers. This is some internal Zend behavior which is fine so far. On my windows machine the phpunit runs without any Problems, trying to initiate all those classes. On my Ubuntu machine however with jenkins running on it, phpunit fails to find the appropriate classes giving me the following error Fatal error: Class 'Application_Model_Mapper_ProjectStatus' not found in /var/lib/jenkins/jobs/PAM/workspace/tests/application/models/Mapper/ProjectStatusTest.php on line 39 The error appears to really be that the Zend-Autoloader doesn't load from the ubuntu machine, but i can't figure out how or why this works. The question remains of why this is. I think i've double checked every point of contact with the zend autoloading stuff, but i just can't figure this out. I'll paste the - from my point of view relevant snippets - and hope someone of you has any insight to this. Jenkins Snippet for PHPUnit <target name="phpunit" description="Run unit tests with PHPUnit"> <exec executable="phpunit" failonerror="true"> <arg line="--configuration '${basedir}/tests/phpunit.xml' --coverage-clover '${basedir}/build/logs/clover.xml' --coverage-html '${basedir}/build/coverage/.' --log-junit '${basedir}/build/logs/junit.xml'" /> </exec> </target> ./tests/phpunit.xml <phpunit bootstrap="./bootstrap.php"> ... this shouldn't be of relevance ... </phpunit> ./tests/bootstrap.php <?php // Define path to application directory defined('APPLICATION_PATH') || define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/../application')); // Define application environment defined('APPLICATION_ENV') || define('APPLICATION_ENV', (getenv('APPLICATION_ENV') ? getenv('APPLICATION_ENV') : 'testing')); // Ensure library/ is on include_path set_include_path(implode(PATH_SEPARATOR, array( realpath(APPLICATION_PATH . '/../library'), get_include_path(), ))); require_once 'Zend/Loader/Autoloader.php'; Zend_Loader_Autoloader::getInstance(); Any help will be appreciated.

    Read the article

  • [ZF] set/add view from controller action

    - by user359650
    Hi all, I'm trying to set a view script to be executed in addition to the currently requested action view script. I want to do this from the controller action itself in a way that this new view script output will be available from the layout $this-layout()-content helper. I found the setView() method but don't know how to use it from the controller. Thanks a lot.

    Read the article

  • how to show jquery notify bar on submit form using php or zf

    - by user1400
    hi guys in my application on zend framework i use of 'jQuery Notify Bar' plugin for display messages, i'd like to show message when my form submit ,the other page is opened and notify bar be open until the other page is completely load and even some second more but the problem is that notify bar show for short Moment and when the other page begin to load , notify bar is closed, and the delay property is not effect to that $('#myForm').submit(function(){ $.notifyBar({ html: "Thank you, your settings were updated!", **delay: 20000,** animationSpeed: "normal" }); how to show notify bar in the other page too? thanks

    Read the article

  • ZF: Url View Helper Acting Strangely

    - by moteutsch
    I have the following route defined: $route = new Zend_Controller_Router_Route( 'users/:id', array( 'controller' => 'users', 'action' => 'profile', 'id' => '' ) ); When I am on the page via the shortened URL (localhost/users/someuser), the URLs defined in the layout file all link to "localhost/users". Here is the code in the layout: <li><a href="<?php echo $this->url(array('controller' => 'index'), null, true); ?>">Home</a></li> <li><a href="<?php echo $this->url(array('controller' => 'search'), null, true); ?>">Search</a></li> <!-- etc. --> How can I fix the code so that the links in the layout file point to the correct URLs?

    Read the article

  • [ZF] How to use Zend_Db without SQL Queries?

    - by rasouza
    The last time I worked with Zend_Db I recall I used to write SQL Queries manually. I've been searching for some ORM application, but, since I read something like Zend_Db is also capable of doing so, I started to try it, but I can't find neither a good tutorial explain it or a good documentation. I read something lake Gateway pattern and ModelMapper class but I can't figure it out. Can someone shine my path? :P

    Read the article

  • load a pickle file from a zipfile

    - by eric.frederich
    For some reason I cannot get cPickle.load to work on the file-type object returned by ZipFile.open(). If I call read() on the file-type object returned by ZipFile.open() I can use cPickle.loads though. Example .... import zipfile import cPickle # the data we want to store some_data = {1: 'one', 2: 'two', 3: 'three'} # # create a zipped pickle file # zf = zipfile.ZipFile('zipped_pickle.zip', 'w', zipfile.ZIP_DEFLATED) zf.writestr('data.pkl', cPickle.dumps(some_data)) zf.close() # # cPickle.loads works # zf = zipfile.ZipFile('zipped_pickle.zip', 'r') sd1 = cPickle.loads(zf.open('data.pkl').read()) zf.close() # # cPickle.load doesn't work # zf = zipfile.ZipFile('zipped_pickle.zip', 'r') sd2 = cPickle.load(zf.open('data.pkl')) zf.close() Note: I don't want to zip just the pickle file but many files of other types. This is just an example.

    Read the article

  • Problems with zend-tool reporting that providers are not valid

    - by Mario
    I have recently setup XAMPP 1.7.3 and ZendFramework 1.10.4 on a new computer and many of the commands that I normally use now fail. Here are the steps I used to setup and test ZF. First I added the ZF library folder (C:\xampp\php\ZendFramework-1.10.4\library) to the include path in php.ini. Then I added the ZF bin folder (C:\xampp\php\ZendFramework-1.10.4\bin) to my Path system variable. To test that everything is configured correctly I ran the command "zf show version" from the command line. The result is "Zend Framework Version: 1.9.6". Immediately something appears to be wrong. The file that is downloaded is "ZendFramework-1.10.4.zip" and the reported version is 1.9.6. I have re-downloaded the latest version (1.10.4) and removed old copy. Still the incorrect version number problem persisted. Having done some research there is a bug in the ZF knowledgebase that version 1.10.3 reports a wrong version number. So that may explain the version number problem. Moving forward I tried to run some zf-tool commands and certain commands reports that the action or provider is not valid. Example: C:\xampp\htdocs>zf create project test Creating project at C:/xampp/htdocs/test C:\xampp\htdocs>cd test C:\xampp\htdocs\test>zf create controller Test Creating a controller at C:\xampp\htdocs\test/application/controllers/TestController.php ... Updating project profile 'C:\xampp\htdocs\test/.zfproject.xml' C:\xampp\htdocs\test>zf create action test Test Creating an action named test inside controller at C:\xampp\htdocs\test/application/controllers/TestController.php ... Updating project profile 'C:\xampp\htdocs\test/.zfproject.xml' C:\xampp\htdocs\test>zf enable layout An Error Has Occurred Action 'enable' is not a valid action. ... C:\xampp\htdocs\test>zf create form Test An Error Has Occurred Provider 'form' is not a valid provider. ... Can any one provide insight into these errors and how to correct them?

    Read the article

  • Can't use my form

    - by Alexandr
    I have class with my form in folder /application/forms/Auth.php it looks like class Form_Auth extends Zend_Form { public function __construct() { $this->setName(); parent::__construct(); $username = new Zend_Form_Element_Text('username'); $password = new Zend_Form_Element_Password('password'); $mail = new Zend_Form_Element_Text('mail'); $submit = new Zend_Form_Element_Submit('submit'); $this->addElements(array($username,$password,$mail,$submit)); } } When i try create object $this->view->form = new Form_Auth(); is see exeption Application error Exception information: Message: Invalid name provided; must contain only valid variable characters and be non-empty Stack trace: D:\WWW\zends\application\Forms\Auth.php(8): Zend_Form-setName() d:\WWW\zends\application\controllers\RegistrationController.php(49): Form_Auth-__construct() D:\WebServer\ZendFramework\ZendFramework\library\Zend\Controller\Action.php(513): RegistrationController-indexAction() D:\WebServer\ZendFramework\ZendFramework\library\Zend\Controller\Dispatcher\Standard.php(289): Zend_Controller_Action-dispatch('indexAction') D:\WebServer\ZendFramework\ZendFramework\library\Zend\Controller\Front.php(954): Zend_Controller_Dispatcher_Standard-dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http)) D:\WebServer\ZendFramework\ZendFramework\library\Zend\Application\Bootstrap\Bootstrap.php(97): Zend_Controller_Front-dispatch() D:\WebServer\ZendFramework\ZendFramework\library\Zend\Application.php(366): Zend_Application_Bootstrap_Bootstrap-run() D:\WWW\zends\public\index.php(26): Zend_Application-run() {main} Request Parameters: array ( 'controller' = 'registration', 'action' = 'index', 'module' = 'default', ) the version zf is 1.10.3 what i do wrong ?

    Read the article

  • Bash Completion Script Help

    - by inxilpro
    So I'm just starting to learn about bash completion scripts, and I started to work on one for a tool I use all the time. First I built the script using a set list of options: _zf_comp() { local cur prev actions COMPREPLY=() cur="${COMP_WORDS[COMP_CWORD]}" prev="${COMP_WORDS[COMP_CWORD-1]}" actions="change configure create disable enable show" COMPREPLY=($(compgen -W "${actions}" -- ${cur})) return 0 } complete -F _zf_comp zf This works fine. Next, I decided to dynamically create the list of available actions. I put together the following command: zf | grep "Providers and their actions:" -A 100 | grep -P "^\s*\033\[36m\s*zf" | awk '{gsub(/[[:space:]]*/, "", $3); print $3}' | sort | uniq | awk '{sub("\-", "\\-", $1); print $1}' | tr \\n " " | sed 's/^ *\(.*\) *$/\1/' Which basically does the following: Grabs all the text in the "zf" command after "Providers and their actions:" Grabs all the lines that start with "zf" (I had to do some fancy work here 'cause the ZF command prints in color) Grab the second piece of the command and remove any spaces from it (the spaces part is probably not needed any more) Sort the list Get rid of any duplicates Escape dashes (I added this when trying to debug the problem—probably not needed) Trim all new lines Trim all leading and ending spaces The above command produces: $ zf | grep "Providers and their actions:" -A 100 | grep -P "^\s*\033\[36m\s*zf" | awk '{gsub(/[[:space:]]*/, "", $3); print $3}' | sort | uniq | awk '{sub("\-", "\\-", $1); print $1}' | tr \\n " " | sed 's/^ *\(.*\) *$/\1/' change configure create disable enable show $ So it looks to me like it's producing the exact same string as I had in my original script. But when I do: _zf_comp() { local cur prev actions COMPREPLY=() cur="${COMP_WORDS[COMP_CWORD]}" prev="${COMP_WORDS[COMP_CWORD-1]}" actions=`zf | grep "Providers and their actions:" -A 100 | grep -P "^\s*\033\[36m\s*zf" | awk '{gsub(/[[:space:]]*/, "", $3); print $3}' | sort | uniq | awk '{sub("\-", "\\-", $1); print $1}' | tr \\n " " | sed 's/^ *\(.*\) *$/\1/'` COMPREPLY=($(compgen -W "${actions}" -- ${cur})) return 0 } complete -F _zf_comp zf My autocompletion starts acting up. First, it won't autocomplete anything with an "n" in it, and second, when it does autocomplete ("zf create" for example) it won't let me backspace over my completed command. The first issue I'm completely stumped on. The second I'm thinking might have to do with escape characters from the colored text. Any ideas? It's driving me crazy!

    Read the article

  • How to specify multiple conditions and the type of condition using Zend_Db_Table

    - by Mario
    I have a function in my model that I need to use multiple conditions when querying. Additionally I would like to also have partial matches. I currently have: public function searchClient($search_term) { $rows = $this->fetchAll( $this->select() ->where('first_name = ?', $search_term) ); return $rows->toArray(); } Which is the equivalent of "SELECT * FROM clients WHERE first_name = 'foobar';" I would like to have a function that is the equivalent of "SELECT * FROM clients WHERE first_name LIKE '%foobar%' OR last_name LIKE '%foobar%' OR home_phone LIKE '%foobar%';" How would I create such a query within Zend_Db_Table?

    Read the article

  • How to load view-Templates from default when not available in module? Zend Framework

    - by Oliver
    Hi my problem with Zend Framework... unfortunately not solved after 3 hours of searching: I have a modular Zend Application, which is working fine if i have my module and error templates in the called module. If i delete error/error.phtml out of views/scripts/ a Fatal Error is showing up that there is no directory. To cut a long story short: How can i define that Zend falls back to default module in this situation? Many thanks in advance.

    Read the article

1 2 3 4 5 6 7  | Next Page >