Thats great Geoff thank you.
On Dec 7, 5:08 pm, Geoff Douglas wrote:
> I think you have most elements i place... I think the thing that is getting
> confusing is how cake is suppose to load the classes.
>
> So here's the kicker. Cake only "loads" models if they are related to
> something that you
I think you have most elements i place... I think the thing that is getting
confusing is how cake is suppose to load the classes.
So here's the kicker. Cake only "loads" models if they are related to
something that you are using. I will use an example from my world to
illustrate.
I have a Prot
Cake just doesn't have a true autoloader so you need to include the
file yourself or use the App class.
On Dec 7, 12:38 pm, RhythmicDevil wrote:
> Well the basic idea is that the application uses two datasources. One
> is the MySQL one the other is a custom one I wrote for our API. The
> Models t
Well the basic idea is that the application uses two datasources. One
is the MySQL one the other is a custom one I wrote for our API. The
Models that use the custom datasource require some methods and
properties, I posted those in the initial question on this thread.
Normally I would just put those
Where are you trying to use the Solidcore Model?
I have done what you are explaining several times. Generally to apply
different relationships to the same models, for better performance, and
cleaner code.
It is possible. And it is not breaking "the Cake way" to do it either. Cake
is very versa
Thanks man. I dont actually expect magic. Although Cake does do some
things magically, I am never sure where the magic ends and my
ignorance begins. In all my searching I never actually found a
document that stated what you did. I realized that I could load the
classes but was not sure if I was som
On Dec 7, 3:11 pm, RhythmicDevil wrote:
> No actually. I created the file and class structure as shown above. I
> get an error from PHP saying class not found. So unless I have to add
> includes or requires to my files Cake does not load the classes.
well, yes. since Cake is just php, and that'
No actually. I created the file and class structure as shown above. I
get an error from PHP saying class not found. So unless I have to add
includes or requires to my files Cake does not load the classes.
So Cake handles this just fine:
AppModel->SubClass
AppMode->AnotherSubClass
But not this
A
On Dec 7, 1:55 pm, RhythmicDevil wrote:
> Guess I was right about sub classing with Cake.
what was your guess - that they work exactly the same way as the
language itself?
--
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org
Check out the new CakePHP Questions
Guess I was right about sub classing with Cake.
On Dec 6, 9:34 am, RhythmicDevil wrote:
> Ok so I tried extending the AppModel class to a third level sub class
> but Cake fails to find it. Perhaps you can clue me in to where I am
> going wrong.
>
> I have the following file structure:
>
> Mo
Ok so I tried extending the AppModel class to a third level sub class
but Cake fails to find it. Perhaps you can clue me in to where I am
going wrong.
I have the following file structure:
Models/
AppModel
GtiApi
Solidcore
Here are what the class files contain:
class AppModel extend
Cake simply has trouble when trying to merge properties in one class
with the AppClass. This should only be a problem with the
AppController since you aren't defining many properties in AppModel.
On Dec 5, 12:34 pm, RhythmicDevil wrote:
> Yeah I had thought, and now have to go and check, that you
Yeah I had thought, and now have to go and check, that you could never
extend passed one sub class from AppModel or AppController for that
matter. I always thought that was odd but had something to do with
cake's auto loaders. Thanks for the clue, I will check this out.
On Dec 5, 3:11 pm, Miles J
Are you referring to where the files go?
You can do anything in Cake that PHP allows, so extend as many times
as you please.
On Dec 5, 11:54 am, RhythmicDevil wrote:
> Hi Miles,
> thanks for the response. Yeah I think that would be the number 3
> option I Iisted.
>
> The thing is how would I do
yes you can
--
Lep pozdrav, Tilen Majerle
http://majerle.eu
2011/12/5 RhythmicDevil
> Hi Miles,
> thanks for the response. Yeah I think that would be the number 3
> option I Iisted.
>
> The thing is how would I do the following:
>
> AppModel
>DbBaseModel
> SomeModel
>ApiBaseMod
Hi Miles,
thanks for the response. Yeah I think that would be the number 3
option I Iisted.
The thing is how would I do the following:
AppModel
DbBaseModel
SomeModel
ApiBaseModel
AnotheModel
To the best of my knowledge you can actually build that kind of
heirarchy in Ca
You could always just create 2 base models?
class ApiBaseModel extends AppModel {}
class DbBaseModel extends AppModel {}
They both would extend AppModel to gain shared functionality and then
both would have their own functionality. Cake IS PHP, so you can do
whatever you want with classes.
class
My application has two datasources. I use one to talk to MySQL for
ACL. The other is a custom datasource that talks an API my company is
developing. There are about 15 models that use the custom datasource
and will probably be more. For each of those models I need to share
methods and properties b
18 matches
Mail list logo