Hey,
first of all, though I did not know bout it, Miles J's solution seems
to be great, and as far as I understood already works out of the box.
the way I went for to distinct Behaviors, components and Models and
have no singelton naming conflicts was this:
Permission <= Model (noun)
Permissonabl
i agree
miles solution is the most appropriate
@Marcelo Andrade
i dont think you
and imagine the array structure - we would have some keys as integer
and some as strings
pretty nasty to work with unless we completely change to the key/value
thing
so not really practicable
On 28 Jan., 08:00, "e
I have not tried it but isn't the Miles idea the best option? it's
the simplest and other solutions stated here are just unuseful,
complicating things when not needed
On 28 ian., 05:08, Marcelo Andrade wrote:
> On Mon, Jan 25, 2010 at 10:50 AM, Chad Smith wrote:
> > (..)
>
> I'm not 100% sure a
On Mon, Jan 25, 2010 at 10:50 AM, Chad Smith wrote:
> (..)
I'm not 100% sure and cannot try for now, but doesn't this work?
'Email');
var $components = array('EmailComponent'=> 'Email');
var $helpers = array('MyForm'=> 'Form');
// ...
}
Best regards.
--
MARCELO F ANDRADE
Belem, Amazoni
Hey,
When I was developing countycriminal.com and identityalert.org we ran
into a very similar issue. What we ended up doing was just naming the
components something different than the model's.
With my latest project theeasyapi.com I did the same thing. This time
though I was more aware of the
I ran into this problem when I had a model and component both named
"Account". Model gets loaded after so I think it overwrites.
However, I am not sure the Component thing will work as I never tried
it. It does work for Behaviors, so its worth a shot.
On Jan 24, 12:40 pm, euromark wrote:
> so th
so the model has a higher priority for
$this->Color than any component with the same name?
good to know :)
On 24 Jan., 21:32, Miles J wrote:
> Just leave them as is, and call the components from the collection
> object.
>
> $this->Color->find(); // Model
> $this->Component->Color->method(); //
Just leave them as is, and call the components from the collection
object.
$this->Color->find(); // Model
$this->Component->Color->method(); // Component
On Jan 24, 7:45 am, euromark wrote:
> that would actually be a nice and easy way to remove conficts if you
> dont want to rename the class
> o
that would actually be a nice and easy way to remove conficts if you
dont want to rename the class
on the other hand that would have the same effect - so you could
rename it right away
maybe it would be more appropriate to call them with their real class
name
$this->ColorComponent->
to delimit the
Just an idea, couldn't a similar solution be as for the models, using
a kind of alias when there are more than one relationship between two
models.
Here it would be that a controller or a component can be referred to
using an alias.
[example]
class ColorComponent extends ... {
var $alias = 'My
actually d) does not work for 80% of all components and therefore is
not really working
scatch that
b) will never make it^^ and changing the core is not really an option
i guess
so its most like either a) or c)
both resulting in 2 groups of components - one with native names and
one with artifici
there can be several naming conflicts between models and components if
you include a new component with an existing model if they have the
same name inside the controller
example:
- db table "emails" with model "Email" and "EmailComponent" both
result in $this->Email in the controller overriding e
12 matches
Mail list logo