CakePHP is a rapid development framework for PHP that provides an extensible architecture for developing, maintaining, and deploying applications. It uses commonly known design patterns like MVC and ORM within the convention over configuration paradigm.
82
votes
21answers
13k views
PHP Framework Decision - Analysis paralysis! [closed]
OK, sorry in advance for the length of this question!
I've spent ages reading about the pros and cons of all the major PHP Frameworks (i.e. Zend, CakePHP, Symfony, CodeIgniter, etc., etc.). I've also ...
5
votes
5answers
5k views
Best way to parse bbcode
I'd like to work on a bbcode filter for a php website. (I'm using cakephp, it would be a bbcode helper)
I have some requirement.
Bbcodes can be nested. So something like that is valid.
[block]
...
25
votes
12answers
8k views
To Use a PHP Framework or Not?
I've started writing a few applications in PHP, and I'm becoming more familiar with the language. Someone told me about CakePHP, and CodeIgniter. I wanted to get a better understanding of how these ...
39
votes
4answers
7k views
Fat models, skinny controllers and the MVC design pattern
I just read a blog post that explains MVC with a banking analogy. I have a few months of experience with web application development with an MVC framework (CakePHP), so I get the basics, but I began ...
1
vote
4answers
2k views
How to “Validate” Human Names in CakePHP?
I have a PHP script that is supposed to check for "valid" human names, but recently cracked against a name with a space, so we added spaces to our validator.
Rather than doing this, is there a way to ...
47
votes
19answers
33k views
Zend Framework or CakePHP? [closed]
My group is going to attempt to build a new CMS from scratch, designed to serve the needs of our organization. It should be noted that none of us have any formal programming education, but we've ...
45
votes
19answers
14k views
Which PHP framework is closest to Ruby on Rails? CakePHP? CodeIgniter? [closed]
I'm going to be switching back and forth between Ruby on Rails projects, and some as-of-yet undecided PHP MVC framework projects. Which of the PHP MVC frameworks out there (CakePHP, CodeIgniter?, ...
15
votes
7answers
34k views
Can I use one model inside of a different model in CakePHP?
Can I use another Model inside one model?
Eg.
<?php
class Form extends AppModel
{
var $name='Form';
var $helpers=array('Html','Ajax','Javascript','Form');
var $components = array( ...
8
votes
4answers
18k views
.htaccess for cakephp
I'm trying to get a CakePHP application to work. For this, I've set up a brand new Debian installation, updated the configuration and put everything in /var/www, which has the following content:
app
...
14
votes
10answers
41k views
What is the equivalent to getLastInsertId() in Cakephp?
If I do getLastInsertId() immediately after a save(), it works, but otherwise it does not. This is demonstrated in my controller:
function designpage() {
//to create a form Untitled
...
2
votes
4answers
898 views
How to change the sequence of 'joins' in CakePHP?
I have the problem with the sequence of joins. The similar problem was in another question http://stackoverflow.com/questions/3343348/manipulating-order-of-joins-in-cakephp. The answer was to use ...
5
votes
2answers
4k views
UNION syntax in Cakephp
Anyone knows a good way to make UNION query in CakePHP? I would like to avoid using $this->query();.
With two tables t1, t2:
SELECT * FROM t1
LEFT JOIN t2 ON t1.id = t2.id
UNION
SELECT * FROM t1
...
1
vote
2answers
2k views
CakePHP 2.1 saving HABTM fields
I have two models User and Movie.. Where those are associated with UsersWatchlist..
public $hasAndBelongsToMany = array('User' => array(
'className' => 'User',
'joinTable' => ...
13
votes
3answers
6k views
Cakephp Auth with multiple “Users” tables
I would like to know how to deal with only ONE authentification process and "users" in multiple tables. I have 4 Users table: users, admins, artists, teamadmins which all have specific fields, but I ...
15
votes
3answers
8k views
Adding a prefix to every URL in CakePHP
What's the cleanest way to add a prefix to every URL in CakePHP, like a language parameter?
http://example.com/en/controller/action
http://example.com/ru/admin/controller/action
It needs to work ...