It is not the code that i was written, just write for this copy
anyone please try to create a table named 'directories' and try to
access it by accessing the controller and model according to the cake
rules and conventions ... am sure you can not access .
On Jul 10, 5:47 pm, Dardo Sordi
On Jul 10, 12:33 pm, Web Test [EMAIL PROTECTED] wrote:
Any one please just tell me why this happens ?
My table name is directories
My controller - directories_controller.php
class DirectoriesController extends AppController
{
var $name = 'Directories';
var $scaffold;
}
my
This wasn't easy to track down but apparently there are 5 reserved
class names in PHP:
__PHP_Incomplete_Class, stdClass, exception, php_user_filter and.
Directory!!
http://ca3.php.net/manual/en/reserved.classes.php
So, use another name.
On Thu, Jul 17, 2008 at 7:11 AM, web [EMAIL
Folder?
On Jul 17, 2:53 pm, Jonathan Snook [EMAIL PROTECTED] wrote:
This wasn't easy to track down but apparently there are 5 reserved
class names in PHP:
__PHP_Incomplete_Class, stdClass, exception, php_user_filter and.
Directory!!
http://ca3.php.net/manual/en/reserved.classes.php
Folder is a CakePHP class name. I'd use a more specific name like
ProjectDirectory.
(Although I wish we had PHP namespaces or that the Cake classes were
pseudo namespaced or that model names required Model to the end of
them. eg: DirectoryModel extends AppModel (just like controllers,
Ho Ho, there are namespaces coming in PHP 5.3 and 6
-Mark
On Jul 17, 10:07 am, Jonathan Snook [EMAIL PROTECTED]
wrote:
Folder is a CakePHP class name. I'd use a more specific name like
ProjectDirectory.
(Although I wish we had PHP namespaces or that the Cake classes were
pseudo namespaced
Any one please just tell me why this happens ?
My table name is directories
My controller - directories_controller.php
class DirectoriesController extends AppController
{
var $name = 'Directories';
var $scaffold;
}
my model - directory.php
class Directory extends Appmodel
{
var
If that's a direct copy paste you have a space in your Model name:
class Directory extends Appmodel
{
var $name= 'Directory ';
var $primaryKey = 'directory_id';
}
O=O var $name= 'Directory[SPACE]';
--~--~-~--~~~---~--~~
You received this
And its AppModel instead of Appmodel
On Thu, Jul 10, 2008 at 9:37 AM, Jonathan Snook
[EMAIL PROTECTED] wrote:
If that's a direct copy paste you have a space in your Model name:
class Directory extends Appmodel
{
var $name= 'Directory ';
var $primaryKey = 'directory_id';
}