[fw-general] Re: Zend_Rest_Controller - Retrieve PUT data

2011-05-20 Thread dmitrybelyakov
Hi, You can use a frontcontroller plugin to catch XML/JSON requests, grab raw body, place it in your request object and then switch context. Here, have a look at Matthew's blog post on the topic: http://weierophinney.net/matthew/archives/233-Responding-to-Different-Content-Types-in-RESTful-ZF-Ap

[fw-general] How to namespace unit tests?

2011-04-26 Thread dmitrybelyakov
Hi guys, Considering the following discussion: http://zend-framework-community.634137.n4.nabble.com/Test-organization-in-ZF2-td3214085.html Test organization in ZF2 I wonder if any particular decision has been made on how to properly namespace unit tests to conform with the upcoming ZendFramewor

[fw-general] Re: Service Layer and form validation/view interaction

2011-03-06 Thread dmitrybelyakov
As data in your application may come not only from web forms but also as a result of asynchronous requests or REST requests you can implement some sort of mediator to validate your domain object. You can then use this mediator to validate a domain object, retrieve a set of errors for domain object

[fw-general] Re: Testing controllers in isolation

2010-08-11 Thread dmitrybelyakov
Hi, Hector! Thanks a lot for a detailed explatation. That's what I thought mostly - I really don't like the regstry approach, but was unsure if it's ok to put things into frontcontroller. Never did that. I that ok? As it seems very misterious and magical :) The only way for me to mess with it was

[fw-general] Testing controllers in isolation

2010-08-10 Thread dmitrybelyakov
Hello, I rescently became a great fan of mocking everything when doing unit testing. Thanks to coolest 'mockery' by Pádraic Brady. Now I'm trying to make all my tests database independent. So the biggest problem here is mocking dependencies for controller tests. I see there was an attempt to do

[fw-general] Re: Help with Zend_Rest_Route

2010-06-18 Thread dmitrybelyakov
Hi, Matthew! Oh, good you let me know because I've already stripped my application down to bones to make this aliases work. It's starting to be more clear to me know that Zend_Rest_Route doesn't act like a regular routes do and is just a maping to module/controllers. That was the major source

[fw-general] Help with Zend_Rest_Route

2010-06-18 Thread dmitrybelyakov
Hello, My application has a module, say a Blog module, with routes to it like the following: /some/path/news/ (module=blog controller=index action=index) /some/path/news/:postAlias (module=blog controller=post action=index) I now need to create a REST api, so I create a Blog_RestController e

[fw-general] Re: add new virtual host in zend server

2010-05-15 Thread dmitrybelyakov
It's located under /usrl/local/zend/apache2/conf/extra :) -- View this message in context: http://zend-framework-community.634137.n4.nabble.com/add-new-virtual-host-in-zend-server-tp2217695p2218167.html Sent from the Zend Framework mailing list archive at Nabble.com.

[fw-general] Re: PHPUnit taking forever?

2010-05-09 Thread dmitrybelyakov
Well, actually no. I think you should still investigate the reason for that. Bootstraping your application is required to do testing of ZendFramework application but there's also phpunit itself that needs to be instantiated to run tests. So what you can do is create a dummy test that extends PH

[fw-general] Re: PHPUnit taking forever?

2010-05-08 Thread dmitrybelyakov
Also you can run phpunit with an option to generate JUnit-like xml report. Than you can see the time each test runs. -- View this message in context: http://zend-framework-community.634137.n4.nabble.com/PHPUnit-taking-forever-tp2133459p2136327.html Sent from the Zend Framework mailing list archi

[fw-general] Re: PHPUnit taking forever?

2010-05-08 Thread dmitrybelyakov
Sorry, somehow missed the post where you say you run only 3 tests. So it's indeed quite a long time for 3 tests and it's very strange. If you run this test how long will it take? /** * @group runMe */ class testingSpeedTest extends Zend_Test_PHPUnit_ControllerTestCase { public function tes

[fw-general] Re: PHPUnit taking forever?

2010-05-08 Thread dmitrybelyakov
Hi, Brian. First of all how much tests do you have? Generally 49 seconds is not so long to test a project. There are still some things to consider: - Test that use the actual database take longer - Testing controller and output (like DOM Query) takes even longer - Generating code coverage report

[fw-general] Re: Testing isValid on zend form with a file element

2010-04-20 Thread dmitrybelyakov
David Mintz wrote: > > Have you dumped $form->getMessages() to see what's failing? > Sure. I did getErrors() wich i guess is the same... and it's empty. Dmitry. -- View this message in context: http://n4.nabble.com/Testing-isValid-on-zend-form-with-a-file-element-tp2014862p2017436.html Sent

[fw-general] Testing isValid on zend form with a file element

2010-04-18 Thread dmitrybelyakov
Hi, I have a quick question on the best approach to testing Zend_Form classes that have Zend_Form_Element_File in them. I have constructed a small test that shows what i am trying to do. In this test the file element is optional so we not goig to provide a value for that. The test is checking i

[fw-general] Re: Can’t get bootstrap in application resource plugin.

2010-04-13 Thread dmitrybelyakov
Hi, Matthew. Yes that's the reason! It was ZendStudio saying i must implement __construct() and init() in order to extend Zend_Application_Resource_ResourceAbstract. Actually implementing __construct() is not required. And it was getting in the way. I figured this out already and deleted the m

[fw-general] Can’t get bootstrap in application resource plugin.

2010-04-13 Thread dmitrybelyakov
It’s should be me doing something wrong but i just can’t get my head around this. So if someone can help me out i would be very greatful. What i do is create a new application resource plugin resource following a Matthew’s guide to http://weierophinney.net/matthew/archives/231-Creating-Re-Usabl

[fw-general] Re: Unit testing Zend_Forms

2010-04-07 Thread dmitrybelyakov
A.J. Brown-3 wrote: > > You should only need to unit test your forms if they are adding > functionality to Zend_Form. The built in Decorators, Filters, > Validators, etc should already be tested. If you're using a custom > Decorator, Filter, Validator, or View, you should test those > separate

[fw-general] Re: Unit testing Zend_Forms

2010-04-06 Thread dmitrybelyakov
Hi, Steve. I just wonder if you have found any good ways of testing Zend_Form classes? Dmitry. -- View this message in context: http://n4.nabble.com/Unit-testing-Zend-Forms-tp999542p1753068.html Sent from the Zend Framework mailing list archive at Nabble.com.

[fw-general] RE: several projects library outside - newbie

2010-03-30 Thread dmitrybelyakov
MEM wrote: > > I see, since I don't have access to php.ini on my shared host env, I can > do > an include on index.php that stays on my public folder, for example. > Yes, you can add things to your include paths in index.php. I think it was somewhere on the quickstart guide, but anyway here's

[fw-general] Re: SOAP_Client - How to handle connection errors?

2010-03-29 Thread dmitrybelyakov
Not sure if i understand correctly - your previous message mas messed. Still if you wonder how to handle this - there was a hack on http://bugs.xdebug.org/view.php?id=249 XDebug issue tracker that was added to their CVS. I think you may need to update your XDebug from repository. Alternatively

[fw-general] Re: several projects library outside - newbie

2010-03-29 Thread dmitrybelyakov
Hi, Generally it's a good practice to keep your library code outside of your application. You don't need to make any symlinks - just make sure the library directory is on your php include paths by modifying php.ini or just manually in your index.php for example. You may need to change paths whe

[fw-general] Re: Remember me Zend_Auth cookie

2010-03-26 Thread dmitrybelyakov
I think there is Zend_Session::rememberMe(); already. Dmitry. -- View this message in context: http://n4.nabble.com/Remember-me-Zend-Auth-cookie-tp1692215p1692256.html Sent from the Zend Framework mailing list archive at Nabble.com.

[fw-general] Re: XDebug?

2010-03-26 Thread dmitrybelyakov
till wrote: > > Your try/catch is not enough then. > > try { > $wsdl = 'badaddress'; > $client = new Zend_Soap_Client($wsdl); > $client->test(); > } catch (Exception $e) { > var_dump($e); // your SoapFault > exit; > } > > Till > > Indeed. That's because XDebug is producing the fat

[fw-general] Re: XDebug?

2010-03-26 Thread dmitrybelyakov
till wrote: > > On Fri, Mar 26, 2010 at 1:25 PM, dmitrybelyakov > wrote: > > Can you explain how the "uncatchable" fatal error looks like? I seem > to be missing the relevant email. > > Till > > Sure - it looks like this: Fatal error: SOAP

[fw-general] Re: XDebug?

2010-03-26 Thread dmitrybelyakov
MEM wrote: > > I would like to suggest that, if this is the issue, please share the > Xdebug > version and Zend Version you are using. > > Thanks in advance, > Márcio > > Ok, for this I was using ZendFramework 1.10.2 Xdebug debug v2.1.0beta3 (latest) PHP 5.3.1 on ZendServer CE 5.0 The issu

[fw-general] XDebug?

2010-03-26 Thread dmitrybelyakov
Hello, If i understand you correctly you are getting an uncatchable Fatal Error with such code: $wsdl = 'BadWsdlAddress'; $client = new Zend_Soap_Client($wsdl); try { $client->test(); } catch(Exception $fault) {

[fw-general] Re: how to decorate error message

2010-03-15 Thread dmitrybelyakov
Hi, As i can see from your example the error is in the same row with input and label. Now you can style it with CSS or if you whant to change the / markup you can use setMarkupListStart()/setMarkupListEnd(). Here's a link to http://zendframework.com/apidoc/core/Zend_Form/Decorator/Zend_Form_Deco

[fw-general] Re: how to decorate error message

2010-03-15 Thread dmitrybelyakov
Hi, As i can see from your example the error is in the same row with input and label. Now you can style it with CSS or if you whant to cang the / markup you can use setMarkupListStart()/setMarkupListStart(). Here's a link to http://zendframework.com/apidoc/core/Zend_Form/Decorator/Zend_Form_Deco

[fw-general] Re: Is saving userId in a session database table possible? (Zend_Session_SaveHandler_DbTable)

2010-02-25 Thread dmitrybelyakov
Yes, this is how you generally put data into session. Dmitry. -- View this message in context: http://n4.nabble.com/Is-saving-userId-in-a-session-database-table-possible-Zend-Session-SaveHandler-DbTable-tp1359860p1569980.html Sent from the Zend Framework mailing list archive at Nabble.com.

[fw-general] Re: Is saving userId in a session database table possible? (Zend_Session_SaveHandler_DbTable)

2010-02-25 Thread dmitrybelyakov
Hello, What reffered to was having additional columns in the session table with a user id to allow some extra functionality i described above. Regarding your approach - I am interested why you do the following things: 1. Operate directly on storage to write session data to your 'data' column, s

[fw-general] Re: Dealing with uncatched exceptions and using set_exception_handler() in Zend Framework

2010-02-23 Thread dmitrybelyakov
Not sure about the Rest_Server, but generally there are two types of exception you can get: 1. Critical exceptions, that happen during application boostrap process 2. MVC Exceptions that happen during dispatch process and afterwards If you want to handle exceptions of first type you may wrap act

[fw-general] How to run front controller blugin from a test?

2010-02-23 Thread dmitrybelyakov
Hi, I have been fighting it for quite a while now but still can't get it to work: Trying to write tests for action controllers I came across an issue with loading plugins. I define plugins in my application.ini and they do run from the browser normally. In testing environment I create an appl

[fw-general] Re: Captcha decorator

2010-02-14 Thread dmitrybelyakov
Maybe some one will post a 'real' solution to this. I'm gonna bookmark this topic because it seems to me that Zend_Form_Element_Captcha does not allow you to use multiple HtmlTag decorators on the element. It just uses the last one you set and ignores all the rest. Maybe you end up writing your

[fw-general] Re: Zend_Translate with TMX: what's the proper usage?

2010-02-14 Thread dmitrybelyakov
Thomas Weidner wrote: > > Or set the "useId" option to false. > In this case the source language is used as message key and the source > must > be set as first translation. > > > > segtype="sentence" >adminlang="en-us" srclang="de-at" o-tmf="abc" >

[fw-general] Re: Alnum validation fails

2010-02-13 Thread dmitrybelyakov
Hi, Thomas. Thank you for response and you are right - pcre was the case. I don't know why but the rpm distribution had UTF support turned on, but with no Unicode properties support as described in this issue on bugtracker http://framework.zend.com/issues/browse/ZF-1641 ZF-1641 , probably people

[fw-general] Alnum validation fails

2010-02-10 Thread dmitrybelyakov
Hello, First of all i know it's 4 o-clock in the morning and i shouldn't write anything that late but anyway, i'm integrating some code to a production environment and came across a strange issue that Alnum validation on Zend_Form elements is no longer working on remote server. Ok, same code (ex

[fw-general] Re: Zend_Translate with TMX: what's the proper usage?

2010-02-09 Thread dmitrybelyakov
That's what i thought first also, as in exaples here: http://xml.coverpages.org/tmxSpec971212.html. But in practice there's no way in that case to translate strings - you can only refference translation by its id, so something 0001 is not very meaningful. I still have a thought that i misuse the

[fw-general] Re: Zend_Translate with TMX: what's the proper usage?

2010-02-09 Thread dmitrybelyakov
Yes thats what I came up to also. Still there was some confusion between the message id and the actual translated string. Was not quite clear from the refernce. I think it's worth mentioning in the manual for the TMX adapter. Thanks for your response and good luck, Dmitry. -- View this message

[fw-general] Re: Assignment in condition - Zend Framework Files

2010-02-06 Thread dmitrybelyakov
Actually that is not a weired thing to do. What it does is assigns a value of expression to a variable and checks if its true. This not a very good practice since it makes your code harder to follow for those who haven't written it. Maybe that is why ZendStudio showse warning messages. Still thi

[fw-general] Zend_Translate with TMX: what's the proper usage?

2010-02-06 Thread dmitrybelyakov
Hello, Hello, I now try to pick the adapter to use for translations and look into TMX. There's one thing that's unclear from the manual and i can't figure it out myself - is it posible to translate strings with tmx or should i reffer to translations only by id? What's the correct usage?

[fw-general] Re: Is saving userId in a session database table possible? (Zend_Session_SaveHandler_DbTable)

2010-01-29 Thread dmitrybelyakov
Hi there! Yes, I changed the default save handler to http://framework.zend.com/manual/en/zend.session.savehandler.dbtable.html Zend_Session_SaveHandler_DbTable and it also allows to save objects in session data. Right now i want to have another column in the database for storing userId of the

[fw-general] Re: Module Autoloader Issue

2010-01-28 Thread dmitrybelyakov
Ok, so maybe you need to register namespace first? foreach ( $helper->getModuleList(APPLICATION_PATH . '/modules', true) as $module => $dir ) { $autoloader->->registerNamespace($module); $loader = new Zend_Application_Module_Autoloader(array( 'namespace' => $module,

[fw-general] Re: Module Autoloader Issue

2010-01-28 Thread dmitrybelyakov
Hi, At application instantiation your modules (if you use them) are being instantiated also. So if you create a bootstrap for a module that extends from Zend_Application_Module_Bootstrap the autoloading will work. Good luck, Dmitry -- View this message in context: http://n4.nabble.com/Module-A

[fw-general] Is saving userId in a session database table possible? (Zend_Session_SaveHandler_DbTable)

2010-01-28 Thread dmitrybelyakov
Hi, I just want to make sure that there’s currently no functionality to allow having additional fields in a session database table, like a userId for example. Am I missing something? Or should I achieve this on application level by writing my own Session_Save_Handler? As I look at http://frame

Re: [fw-general] Using Connection Mock with Zend_Test_PHPUnit_ControllerTestCase

2009-12-19 Thread dmitrybelyakov
Jake McGraw wrote: > > I'm digging into some TDD, and I've managed to convert all of my Models to > use Zend_Test_PHPUnit_DatabaseTestCase and it works wonderfully. > > My question is, is there any way to integrate Connection Mocking, like > that > with my model testing to work within the > Ze

Re: [fw-general] Sudden performance drop - server settings?

2009-12-02 Thread dmitrybelyakov
Hi, This indeed should be somehow related to the cache of your application as Rob previously stated. You should check what php cache extension was used and make sure its available. If file cache was used you should check the directories with your caches. You should enable both read/execute permi

Re: [fw-general] ZF Custom Router

2009-10-26 Thread dmitrybelyakov
prodigitalson wrote: > > Just add another route.. but take care they are you add them in order > (most general -> most specific): > > $default = new Zend_Controller_Router_Route( > ':lang/:controller/:action/*', > array('controller'=>

Re: [fw-general] ZF Custom Router

2009-10-26 Thread dmitrybelyakov
Flirt4 wrote: > > Hello all! > I`m new to zend, and I have some difficult with zend router. I have site + > admin area on zend framework. Now i need to add some languages to my site. > I do it and all is ok, now my router in bootstrap.php look like this : > > $route = new Zend_Controller_Rout

[fw-general] Incorrect dispatch in testing environment due to baseUrl being set.

2009-10-24 Thread dmitrybelyakov
Hi, I observe some nasty differences between these two objects behavior Zend_Controller_Request_Http Zend_Controller_Request_HttpTestCase If we navigate to a URI like this: '/modulename/123/456/' and printout this two objects in _routeStartup() hook we see: for regular request object: [_req

[fw-general] Xdebug and unit testing (cannot redeclare class)

2009-09-15 Thread dmitrybelyakov
Hello, First let me say that its my first experience with unit testing ZendFramework applications. What i'm trying to do is set up PHPUnit along with XDebug for code coverage reports. I wrote few very basic tests that run fine but as soon as Xdebug gets to my aplication folder to generate repor

Re: [fw-general] Is it possible to have library code under module directory in ZF?

2009-08-03 Thread dmitrybelyakov
swilhelm wrote: > > Did you getting any direct responses? Did you resolve this problem? > > Would be interested in hearing the solution. > > - Steve W. > Hello, The only solution i found for now is adding it into include_paths, although i tried to avoid it using autoloader. Anyway it does

Re: [fw-general] Is it possible to have library code under module directory in ZF?

2009-08-03 Thread dmitrybelyakov
Mark Wright-3 wrote: > > I imagine you just need to have it in your include path. You should be > able to add it when you figure out which module is being used, maybe > in a controller plugin. If the namespaces are different for each > module you might want the autoloader set to load all namesp

[fw-general] Is it possible to have library code under module directory in ZF?

2009-08-02 Thread dmitrybelyakov
I've been fighting it for the whole day now, and it doesn't get any more clear for me. The idea is simple, i want to have my library code under one of my module directories. Like this: /application/modules/somemodule/ /application/modules/somemodule/controllers /application/modules/somemodule/mo

Re: [fw-general] Zend_Form_Element_Submit class attribute

2009-07-11 Thread dmitrybelyakov
phpoptimizer wrote: > > How to add a 'class' attribute to Zend_Form_Element_Submit element? It > doesn’t recognize it whatever way I tried: > > $this->addElement( > 'Submit', > 'btn_search', > array( > 'label' => 'Search', >

Re: [fw-general] Zend Framework book or real world example based on v1.8?

2009-07-09 Thread dmitrybelyakov
Joseph Crawford wrote: > > don't buy ZF In Action especially if you are looking at 1.8, it does > not cover any of the new features. It is based on 1.0 - 1.4 and i > believe they hit 1.6 in the end. > > I wasted my money on that book and was not happy about it. > Yup, that's true both t

Re: [fw-general] Zend Framework book or real world example based on v1.8?

2009-07-09 Thread dmitrybelyakov
swilhelm wrote: > > Looking for a book or example that incorporates: modules, auth & acl > controlling module-based behavior, cli or rest read/write access to some > of the data (again with auth & acl control), zend test, and doctrine > integration. > Hi Steve, Don't now about the Doctrine s

Re: [fw-general] A quick question on radio buttons (again)

2009-07-05 Thread dmitrybelyakov
lightflowmark wrote: > > A custom decorator (although you may be able to piece it together with the > Label decorator and the HtmlTag decorator). > > > One approach would be to extend the Label decorator; pass the URL of the > image as an option to your extended label decorator and have it re

[fw-general] A quick question on radio buttons (again)

2009-07-01 Thread dmitrybelyakov
Hello, I know this had been raised a million times but i think i broke my head trying to get through the reference guide for 2 days. Now i google and see a lot of people complain about lack of useful examples in the docs so thought it it would be ok if i post on the topic again. Hope this will b

[fw-general] Re: Re[fw-general] quest parameters from within view helper

2009-06-30 Thread dmitrybelyakov
admirau wrote: > > I want my view helper to return unique string based on controller and > action. > > Is it possible to get request parameters from within view helper? > In the controller I would write $this->_getParams(); > but I don't know how to obtain the same in my view helper. > > --

Re: [fw-general] Placeholder view helpers in partials don't work for layouts?

2009-06-16 Thread dmitrybelyakov
Deanna Bonds-2 wrote: > > I think what you are looking for is named capture regions. You layout > all your static layout in the layout.phtml file (or whatever your name > for the layout file is). Then in your views you use named placeholders > (capture sections) for the content you want to

Re: [fw-general] Placeholder view helpers in partials don't work for layouts?

2009-06-16 Thread dmitrybelyakov
Hi Deanna, First of all thanks for your reply. Glad i got some response here. Maybe i don't use the paradigm it was intended, so correct me is i am wrong: The Layout is the actually the template of my webpages with a main content area that is controlled by module controllers. Besides the mai

[fw-general] Placeholder view helpers in partials don't work for layouts?

2009-06-15 Thread dmitrybelyakov
Hi, Today i came across an issue that i couldn’t find a nice solution for. In short it stated in the subject, placeholder view helpers like headScript() don’t work for partials (or any custom view helpers) when in layout context. Like in this example: headLink(); ?>

Re: [fw-general] View Helper paths

2009-06-13 Thread dmitrybelyakov
spaceage wrote: > > Thanks, that was the trick...addHelperPath assumes 'View_Helper' appended > to the namespace prefix sent as second parameter. > Glad i was able to help. Good luck. Dmitry. -- View this message in context: http://www.nabble.com/View-Helper-paths-tp24006943p24017279.ht

Re: [fw-general] Zend_Toolbar proposal ready for review

2009-06-13 Thread dmitrybelyakov
DASPRiD wrote: > > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Hi peeps, > > I've just finished the proposal for Zend_Toolbar, a debug bar for > Firefox. I'd like to collect some feedback before moving on to the next > step: > > http://framework.zend.com/wiki/display/ZFPROP/Zend_Tool

Re: [fw-general] View Helper paths

2009-06-13 Thread dmitrybelyakov
spaceage wrote: > > Hi, > I'm trying to get a custom view helper to work... > ... > Why the exception? > Hi, I think the class name should be My_View_Helper_CartVitals(). And i guess the underscore is not required when adding a path: $view->addHelperPath('/application/views/helpers', 'My

Re: [fw-general] User Registration and Login Management Module - Best Practice Blueprint or Example for 1.8

2009-06-10 Thread dmitrybelyakov
swilhelm wrote: > > I would like see best practice blueprint or example for implementing > modules in 1.8. > > A user registration and login management module would be ideal. > > Any suggestions? Thanks in advance. > > - Steve W. > Hi, I am at the moment reading an article/tutorial on h

[fw-general] Confusion with Request object methods in ErrorController

2009-06-10 Thread dmitrybelyakov
Hello, I just wonder - what's wrong with doing like this in my (default module's) ErrorController: $currentModule = $this->getRequest()->getParam('module'); $currentModule = $this->getRequest()->getModuleName(); Because I don't get the same results with these two functions. Fi

Re: [fw-general] Zend_Application_Module_Bootstrap - bootstrapping the default module

2009-06-03 Thread dmitrybelyakov
ignace wrote: > > Yeah that was my first idea too, but the problem is that i use a common > bootstrap for all my applications which just loads the default stuff and > my default module can vary which is then an e-commerce- or cms system > therefor i need to bootstrap the module itself as this b

[fw-general] Zend_View: View scripts path stack and ViewRenderer

2009-06-02 Thread dmitrybelyakov
Hello, We are trying to change the order in which view scripts are searched in the filesystem and experiencing some difficulties. We generally want to keep all our View scripts under the same directory like: APPLICATION_PATH . '/design/views/modulename/views/scripts/' and if it is not there, d

Re: [fw-general] Zend_Application_Module_Bootstrap - bootstrapping the default module

2009-06-02 Thread dmitrybelyakov
ignace wrote: > > Why can't i have a Bootstrap in my default module? The code says: > > if ($module === $default) { > continue; > } > Hi, I think that's because your default module actually 'is' your application. You may use your application Bootstrap instead. -- View this message in

Re: [fw-general] How to get Config options?

2009-06-02 Thread dmitrybelyakov
Rob Allen-3 wrote: > > > You can create an _initConfig() method in your Bootstrap class that > looks like this: > > protected function _initConfig() > { > $config = new Zend_Config($this->getOptions()); > Zend_Registry::set('config', $config); > } > > > Re

Re: [fw-general] How to get Config options?

2009-06-01 Thread dmitrybelyakov
vince. wrote: > > > Another way will be storing the config in the registry then you could > access > it anywhere. > > Hi, Yes sure. I expected it to be there since it's already passed to Zend_Application but it's not. Just don't want to include the same file for the second time. But see

Re: [fw-general] How to get Config options?

2009-06-01 Thread dmitrybelyakov
Jonathan Lebensold wrote: > > hmmm... good point, I was using that in a unit test and it was fine. > > Not sure if this is the best way, but you can grab the options in a > controller like so: > > $this->getInvokeArg('bootstrap')->getOptions() > > Yes indeed, I found it after you gave me

Re: [fw-general] How to get Config options?

2009-06-01 Thread dmitrybelyakov
Jonathan Lebensold wrote: > > $this->application->getOptions() > Hi, Jonathan. Thank you for your reply. But what does $this refer to in your example? In what context should I run it - ActionController? Front controller? I actually need that in Models. I tried that, and also tried calling it

[fw-general] How to get Config options?

2009-06-01 Thread dmitrybelyakov
Hello, I am a little frustrated as I cannot access my application configuration options. I do not load my config file anywhere - only in the index.php file when i pass it to Zend_Application. I've spent several hours trying to figure out where it goes after that and how to access it. Do i need

Re: [fw-general] Autoloading modules

2009-06-01 Thread dmitrybelyakov
Hello, There is some more on the topic i discovered after tweaking it around: the problem seems to be because of default module actually being 'default' that makes Zend MVC treat it like an ordinary application folder and NOT like a module folder. That's the reason why module's Bootstrap is ign

Re: [fw-general] Autoloading modules

2009-06-01 Thread dmitrybelyakov
Jurian Sluiman wrote: > > > Thanks for your quick answer. I added in each module directory a > Bootstrap.php. E.g. in application/modules/blog/Bootstrap.php i have a > Blog_Bootstrap extending Zend_Application_Module_Bootstrap. > In the global bootstrap I have added the application/module dir

Re: [fw-general] Bootstrapping from application.ini

2009-05-31 Thread dmitrybelyakov
Nicky-7 wrote: > > ... > However, > a repeating problem is that we cannot seem to find a comprehensive list of > ini settings that translate to Bootstrap processes. > > Is there a document somewhere with such information? > ... > Hi, yes there is. Please check Reference guide in part on Zend

Re: [fw-general] Widgets and why do I need a custom view helper.

2009-05-28 Thread dmitrybelyakov
SirEdward wrote: > > A view helper is able to access the model so long as it is only reading > from the model. Most MVC diagrams will show this. As long as the view > helper is only retrieving data from the model and not writing to it then > this is fine. > > So this makes perfect sense in my

Re: [fw-general] A question on loading Models

2009-05-17 Thread dmitrybelyakov
Jurian Sluiman wrote: > > Hi Dmitry, > You should search for the term module bootstrapping on this list. Create a > Bootstrap class for each module in your module folder and autoloading will > be > ready. There's no need for including the files manually. > R, Jurian > -- > Jurian Sluiman > So

[fw-general] A question on loading Models

2009-05-17 Thread dmitrybelyakov
Hello, This is a really basic question, so I just want to figure out the best way to do it. Lets assume we have a Module that has a Model and a Database Mapper for that model. We now want to access this model from other parts of our application like Front Controller Plugin. So what would be the

[fw-general] Routing from Database

2009-05-10 Thread dmitrybelyakov
Hello, First of all I am very new to ZF and have not enough familiarity with it at the moment, but have a programming background and experience in other MVC frameworks. I am struggling to setup my first project structure. (Actually moving my codebase to ZF :) I basically need to things, so it w