RE: Commented Version of CakePHP Manual
If its not going to be official accepted by cakephp.org - I can host it on cakephp.nu ( I have http://docs.cakephp.nu already ) and http://logs.cakephp.nu ( IRC logs ) You can contact me by email or from IRC ( Jippi ) if you like the idea -Original Message- From: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of rdoggsv Sent: 17. juni 2007 17:26 To: Cake PHP Subject: Re: Commented Version of CakePHP Manual Nice idea , lets hope it will get a lot of comments and with time turn into a great resource :) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
RE: Cake 1.2 - Data Validation - Multiple rules per field [hack/solution]
Hey Any reason why you didn't use http://bakery.cakephp.org/articles/view/55 ? /Jippi -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Dr. Tarique Sani Sent: 12. april 2007 08:45 To: [EMAIL PROTECTED] Subject: Cake 1.2 - Data Validation - Multiple rules per field [hack/solution] I needed it now!!! http://cheesecake-photoblog.org/doku.php?id=multiple_validations_per_field_i n_cakephp_1.2 Not as elegant as I would want it but for now it works. Hope that helps someone Cheers Tarique -- = PHP for E-Biz: http://sanisoft.com Cheesecake-Photoblog needs you!: http://cheesecake-photoblog.org = --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to [EMAIL PROTECTED] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
RE: logging cake errors
http://php.net/manual/en/function.set-error-handler.php would probadly be nicer ;) I got a small utility class that mail me any errors that is above E_NOTICE Quite nice way to get error reporting, even if debug === 0 :) -- Christian -Original Message- From: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of John David Anderson (_psychic_) Sent: 29. marts 2007 22:46 To: cake-php@googlegroups.com Subject: Re: logging cake errors On Mar 29, 2007, at 2:32 PM, Charles Schaefer wrote: Good, but I don't saw an automatic log system in the cake! Am I wrong with this thought, or cake really haven't a log system? $this-log(message); :) http://api.cakephp.org/ class_object.html#942f17c527c523372325ee54d343ad44 I think the logs are in /app/tmp/logs/. -- John --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
RE: Multiple file upload ?
iF you just need a simple 'plain old multi upload' feature, just do: input type=file name=data[Upload][] / And then debug( $this-data['Upload'] ); in your controller show contain an array of file info (tmp path ect) -Original Message- From: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Mech7 Sent: 2. marts 2007 17:28 To: Cake PHP Subject: Multiple file upload ? Is there a explanation or tutorial anywhere which explains how to do multiple file uploads and store the name in the database? I have found this: http://thinkingphp.org/demos/cake-timer/ but it looks a little complicated and uses a perl script :( --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
RE: model autoloading
Hey Sounds nice, but you would be better of to release it - and then ask for the general public interest.. I don't know if I'm interested until ive checked it 'under the hood' :) - but it does sound nice /Jippi -Original Message- From: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Darian Anthony Patrick Sent: 12. februar 2007 15:52 To: cake-php@googlegroups.com Subject: RFC: model autoloading -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Good day all, We've been using some code internally for about a year now that autoloads models. It handles MySQL 4 and 5 right now, and works by looking at the foreign key relations/constraints defined in the database schema, and creates appropriate CakePHP models. This code works fine, and works well, but it lacks some features that I'd like to see: - - ability to define validation and callbacks on generated models - - ability to write them to the filesystem (this overlaps with Bake) after first autoload - - support for PostgreSQL I'm considering releasing this code to the Bakery, but I first wanted to gauge community interest. Is runtime model autoloading something that you would use? - -- Darian Anthony Patrick Principal, Application Development Criticode LLC (215) 240-6566 Office (866) 789-2992 Facsimile Web: http://criticode.com Email: [EMAIL PROTECTED] JID: [EMAIL PROTECTED] -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.2.2 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFF0H8bKpzEXPWA4IcRAvqdAJ9fMwNQ55WdKHKuikq3u23MaZCRAQCeKRRa H8LpYn5V+wZxcXgXURxUeIQ= =6E9O -END PGP SIGNATURE- --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
CakePHP and PHPDoctrine
Hey Im currently working on a semi-port of phpdoctrine for CakePHP - and was wondering if anyone would like to help out or give some feedback on the level of compat there should be between CakePHP model methods and Doctrine. Currently it supports limited amount of form helpers ect. /JIppi --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
RE: Email Notification
Hi I'm currently working on an 'handler' framework for cake vendor dir :) It's php5 only though, but it supports a few different nice things - the real simple outline is: You have a 'Handler' (singleton) where you can 'trigger' some default events and your own custom ones For each Handler, you have the option to attach any amount of observers, that depending on the event you trigger, will be notified with relevant data. You also have the option to attach 'workers' - that could be a FileLoggerWorker, or XmlLoggerWorker - your observers can use as a resource. A really simple example of use would be something like this in my bootstrap file: code vendor( 'EasyHandler/bootstrap' ); EasyHandlerConfig::getInstance()-addRoot( APP . 'EasyHandler' ); /* @var $phpErrorHandler PhpErrorHandler */ $phpErrorHandler = EasyHandlerFactory::getHandler('PhpError'); $phpErrorHandler-writeEvent(EH_MAIL, E_WARNING, true); $phpErrorHandler-writeEvent(EH_LOG, E_STRICT, false); $phpErrorHandler-loadWorker('File',array('filename' = 'php_errors.txt')); $phpErrorHandler-loadObserver('PhpError'); $phpErrorHandler-loadObserver('PhpErrorMail',array('email' = '[EMAIL PROTECTED]')); set_error_handler('cakeErrorHandler'); /** * Wrapper to make sure that the PHP errors is handled by our class * * @param integer $log_level * @param string $log_text * @param string $error_file * @param integer $error_line */ function cakeErrorHandler( $log_level, $log_text, $error_file, $error_line ) { PhpErrorHandler::getInstance()-handleError( $log_level, $log_text, $error_file, $error_line ); } /code What it does should be rather simple to figure out, but in short : a) vendor the boostrap for the framework b) add a new search path ( APP . 'Easyhandler' ) - this is where the factory will look for observers, workers, handler, exceptions ect. c) Request the PhpErrorHandler from the factory (handles auto-loading of interfaces ect. ) d) Enable two events ( EH_MAIL = mail event, and EH_LOG is logging event ) e) Attach a FileWorker that is going to output to php_errors.txt ( default log path is in LOGS ) f) Load a PhpErrorObserver that is going to handle the error level filtering ect. g) Load a PhpErrorMailObserver that will send me a nice email each time there is a E_WARNING triggered somewhere h) Change the default PHP error handler - so it uses my EasyHandler framework A few notes on this is that the PhpErrorHandler auto-enables logging for the current level of error_reporting() you have, that's why they are omitted. Also, if you prefer the error log to be in XML, just replace the line with: code $phpErrorHandler-loadWorker('Xml',array('filename' = 'php_errors.xml')); /code That only requires the worker to implement the XmlLogger interface :) Other examples could be in my AppController: code this-log = EasyHandlerFactory::getHandler('Logger'); $this-cache= EasyHandlerFactory::getHandler('Cache'); $this-cache-loadObserver('CacheApc'); $this-benchmark= EasyHandlerFactory::getHandler('Benchmark'); $this-Event= EasyHandlerFactory::getHandler('CakeEvent'); $this-Event-addObserver( EasyHandlerFactory::getObserver('CakeSecurity') ); $this-Event-addObserver( EasyHandlerFactory::getObserver('CakeMenu') ); /code Where one of the more interesting ones is Benchmark and Cache handler ;) The Event handler is used to 'overtake' everything that is possible to overtake from cake in the form of callbacks. code Function afterFilter() { $this-Event-triggerControllerEvent( $this, __FUNCTION__); } /code Is going to trigger all observers in CakeEventHandler that implements the CakeControllerInterface :) The same is doable for models aswell /Jippi -Original Message- From: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of ianh Sent: 2. februar 2007 09:42 To: Cake PHP Subject: Re: Email Notification Hi All, Fully agree that the way to use model callbacks for things like sending emails is to use observers - there is a tutorial on the Bakery on this. It is such a flexible way of doing things that I have started to put quite a lot of business logic that might otherwise go elsewhere into observers. I have found that I can log errors, access any model easily (getModel method) and trigger emails etc without introducing dependencies into my models and allowing my controllers to focus on handling application flow and exceptions. Ian On 1 Feb, 22:25, Langdon Stevenson [EMAIL PROTECTED] wrote: Hi Tarique What is the recommended approach for an AfterSave function triggering and sending an email notification on a saved or submitted form? Thanks. I personally prefer doing this in the Controller as I tend to use a component to send emails. Keeps the Model free of any dependencies If at all you want to do this with the Model then I would suggest make the Model Observable and the Email component should be an Observer I was having thoughts along those lines too. I
RE: strange output of // during load helpers
Do you use requestAction somewhere? That could be a reason for the two calls to _loadHelpers :) since there is called two actions for each request -Original Message- From: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of jyrgen Sent: 30. januar 2007 03:41 To: Cake PHP Subject: strange output of // during load helpers since a couple of days i don't get rid of a trailing double slash on the top of *all* pages. i remember having placed some echo statements eventually into core files in order to get acquainted with what's going on behind the scenes. tracked this down up to the _loadHelpers() function in the view class, where i put a pr($helpers); statement into line 604 of view.php. this is what's on top of the pages now: Array ( [0] = Html [1] = Form [2] = Session ) // Array ( [0] = Html [1] = Session ) As you can see loadHelpers() is called twice (why?), and in between the output // is generated. i don't get any further with this... jyrgen --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
RE: Unoffical API / Beta RFC [new]
Hi Yeah, this topic ended up with people discussing the quality of Cake docs/manual instead of discussion WHAT I could add to improve the situation for new Bakers The ~3 first posts had relevance for the original topic, and then it went completely off track :( I'm sitting here now, with the feeling that I don't have a clue what people felt about the API app I'm making, but a clear feeling that most people aren't very happy about the current situation... And without sounding like a saint or angel, I'm beginning to feel some of the frustration the core team problem has when reading the group and looking at one post after another with the endless discussion on how many things there need improvement in the API/DOC/Manual, and yet so little action behind those words. I felt like doing this app for Cake because I wanted to contribute to the project - I'm far from some godlike baker, actually, phpnut would probably slap me around if he saw the code, but I don't care.. I'm just putting action behind my words when I told gwoo I felt like API lacked some features So please, feedback on the TOPIC, not about how bad/lacking the current is... /Jippi Ps. Yes, my English suck, and yes, I'm a little pissed off right :P -Original Message- From: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Dr. Tarique Sani Sent: 22. januar 2007 10:40 To: cake-php@googlegroups.com Subject: Re: Unoffical API / Beta RFC [new] On 1/22/07, RichardAtHome [EMAIL PROTECTED] wrote: I'd love to contribute to CakePHP as I believe its the best thing to happen to PHP in all the time I've been programming with it (since PHP3). Nice to know that - I wont go as far as saying CakePHP is the best thing or bother with I am older than you in this ;) I was trying to illustrate that perhaps, if the documentation was available then the learning process would be faster and I would be in a better position to help others. As it stands, I'm no-where near up to speed with CakePHP to help out in any substantial way. Again a common fallacy on public forums - I am too new/know too less to help - You teach best what you want to learn the most. And your are right, this is one of the most friendly, a knowledgeable lists I've subscribed to and I'm keen to take a more active roll. I notice that you *are* already more active than I am so I understand how OSS projects are developed, but lack of documentation has sunk other worthy projects in the past. I'd hate to see cake suffer the same misfortune. Oh! its not that bad... I'm not asking for wikipedia scale documentation. What would really be useful would be to extend the sample Blog application to cover the stuff that make a site 'work'. The IBM tutorials just provided that bit - and thank god they did not do another blog Cheers Tarique P.S. This thread has gone too off topic so EOT form my side -- = PHP Applications for E-Biz: http://sanisoft.com Cheesecake-Photoblog: http://cheesecake-photoblog.org = --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
RE: Unoffical API / Beta RFC [new]
I have created a IRC channel on Freenode for the relevant discussions: #cakephp.doc ( irc://irc.rizon.net/cakephp.doc ) /jippi -Original Message- From: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of RichardAtHome Sent: 22. januar 2007 12:16 To: Cake PHP Subject: Re: Unoffical API / Beta RFC [new] tbh, I wasn't being off topic (kinda ;-). Jippi was asking what people would like to see in a documentation project and I answered: Example code. It snowballed from there. I'm definitely not having a dig at all the hard work done by everyone on the CakePHP project. If I didn't think it had potential I wouldn't have bothered righting the post. Jippi, the app is looking great :-) How about posting a few tutorials on how you glued all the various bits together? Include that in the documentation and I think you are on to a winner! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
RE: CakePHP Reference Project
I have created a IRC channel on Freenode for the relevant discussions: #cakephp.doc ( irc://irc.rizon.net/cakephp.doc ) /jippi -Original Message- From: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Dr. Tarique Sani Sent: 22. januar 2007 13:33 To: cake-php@googlegroups.com Subject: Re: CakePHP Reference Project On 1/22/07, RichardAtHome [EMAIL PROTECTED] wrote: Ok, I've had my moan about the documentation for cake ;-) Time to do something about it. Great Anything else? Addons / Plugins - which are truly plug and play Making the app plugable into some popular CMS (Joomla?) and yet it can still be used in stand alone mode. And to put my time where my mouth is I am willing to spend some time on fleshing out some of these things Cheers Tarique -- = PHP Applications for E-Biz: http://sanisoft.com Cheesecake-Photoblog: http://cheesecake-photoblog.org = --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Unoffical API / Beta RFC
Greetings list As we all know CakePHP has a great API website ( http://api.cakephp.org ) However, it lacks some features / goodies that can raise it to 'the next level'. So after some reading and learning - I have come up with a draft on how it COULD look / work. -- http://docs.cakephp.nu/ -- It's still in very early beta / testing, so don't expect the perfect golden solution for now :) This post is meant as a RFC ( Request For Comments ) post on how it should look, or perhaps some features that would be nice. Please note that this is not meant to 'overtake' any official CakePHP websites, and thus I'm not going to implement features that would compete with The Bakery or its friends. Its however most likely that if this little project of mine turns out successful, it will be donated to Cake Foundation, and linked to The Bakery user database and become tighter integrated with the CakePHP websites. Features I plan to implement is: - Manual page php.net style for each method or perhaps class - Comment archive for each function ( Imagine 900 Model posts :p ) - RSS feeds Best regards Christian 'Jippi' Winther :) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
RE: Unoffical API / Beta RFC
Hi The login system shouldn't require any special browser enabled features... Its just a plain old 'POST' form. Does it not work for you or ? -Original Message- From: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of MJ Ray Sent: 19. januar 2007 00:48 To: cake-php@googlegroups.com Subject: Re: Unoffical API / Beta RFC Christian Winther [cwi.dk] [EMAIL PROTECTED] wrote: -- http://docs.cakephp.nu/ -- [...] This post is meant as a RFC ( Request For Comments ) post on how it should look, or perhaps some features that would be nice. Try resizing the window and fonts: 600px width, for example, to see page elements and lines colliding with each other. What are the requirements of the login system? Javascript? Moderator approval? Sending data to a foreign country? Also seems some bug with symbols, but I guess you know that. - Manual page php.net style for each method or perhaps class - Comment archive for each function ( Imagine 900 Model posts :p ) - RSS feeds I can't see how to get from the function description to its source code. A very useful thing might be linking to the php manual for things searched if they're not cakephp functions, or at least having an easily-grabbable (accesskey or maybe style=position:fixed) search box for it. Another useful thing would be to document the changes in functions (additions, removal, parameters) between cakephp versions over time. Hope that helps, -- MJR/slef http://www.ttllp.co.uk/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
RE: Active Resource Implementation
Can you guide me to some information regarding Active Resource Pattern couldnt find anything on google looking like it From: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Felix Geisendörfer Sent: 27. november 2006 17:25 To: cake-php@googlegroups.com Subject: Re: Active Resource Implementation Afaik, this is something is planned for CakePHP 1.2. Right now it's still in it's early phase, meaning the Datasource/Model object are undergoing some major refactoring in order to make them more generic. -- Felix Geisendörfer aka the_undefined -- http://www.thinkingphp.org http://www.fg-webdesign.de Pablo Viojo wrote: Hi all, Are there any plans about implementing the Active Resource Pattern for Cake?. I've searched the group index and trac but haven't found anything about it. Regards, -- Pablo Viojo [EMAIL PROTECTED] http://pviojo.net --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
RE: Active Resource Implementation
Ah okay, i know of that pattern very well, thanks J From: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Mariano Iglesias Sent: 27. november 2006 19:07 To: cake-php@googlegroups.com Subject: RE: Active Resource Implementation He meant Active Record Pattern: http://en.wikipedia.org/wiki/Active_Record http://en.wikipedia.org/wiki/Active_Record Active record is an approach to reading data from a database. A row in a database table or view is wrapped into a class, thus an object instance is tied to a single row in the database. After creation of an object, a new row is added to the database upon save. Any object loaded gets its information from the database; when an object is updated, the corresponding row in the database is also updated. The wrapper class implements accessor methods for each column in the table or view. -MI --- Remember, smart coders answer ten questions for every question they ask. So be smart, be cool, and share your knowledge. BAKE ON! _ De: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] En nombre de Christian Winther [cwi.dk] Enviado el: Lunes, 27 de Noviembre de 2006 02:45 p.m. Para: cake-php@googlegroups.com Asunto: RE: Active Resource Implementation Can you guide me to some information regarding Active Resource Pattern - couldn't find anything on google looking like it --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Cake PHP group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---