Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.php > #16996

Re: Class 'Model' not found

From Thomas 'PointedEars' Lahn <PointedEars@web.de>
Newsgroups comp.lang.php
Subject Re: Class 'Model' not found
Date 2016-08-30 15:36 +0200
Organization PointedEars Software (PES)
Message-ID <1874125.irdbgypaU6@PointedEars.de> (permalink)
References (8 earlier) <npum3p$d8e$1@jstuckle.eternal-september.org> <4222356.31r3eYUQgx@PointedEars.de> <nq3rdg$gih$1@jstuckle.eternal-september.org> <1619437.tdWV9SEqCh@PointedEars.de> <nq405e$vkj$1@jstuckle.eternal-september.org>

Show all headers | View raw


Jerry Stuckle wrote:

> On 8/30/2016 8:41 AM, the well-known troll Thomas 'Pointed Head' Lahn
                            ^^^^^^^^^^^^^^^^        ^^^^^^^^^^^^^^
It takes one to know one.

> wrote:
>> Jerry Stuckle wrote:
>>> On 8/30/2016 5:39 AM, the troll Thomas 'Pointed Head' Lahn wrote:
>>>> Jerry Stuckle wrote:
>>>>> On 8/28/2016 12:00 AM, Matthew Carter wrote:
>>>>>> Thomas 'PointedEars' Lahn <PointedEars@web.de> writes:
>>>>>>> IOW, the problems that you are presuming simply *do* *not* *exist*.
>>>>>> Great explanation, a wonderful reference for anyone needing to
>>>>>> understand these topics better.
>>>>> And it solves no problem.
>>>>
>>>> It solves the problem that dependencies have to be resolved manually,
>>>> which was the problem of the OP.
>>>>
>>>>> These problems *do exist* in real life.
>>>> Only to the incompetent.
>>>
>>> It doesn't solve the problem of multiple classes with the same name.
>> 
>> That was _not_ the problem of the OP.  It was an unfounded assumption by
>> “J.O. Aho” who did not read the OP carefully, too.  The OP got
>
> No, it is a problem caused by your "solution".

Nonsense.

> And an even bigger problem than the ops, because it is not evident.

You have no clue what you are talking about.  Different to the OP, an 
autoloader would use “require_once” *by definition* (I said in my first 
followup that using “require_once” instead of “include” in the original code 
is the first step in analysing the problem; Christoph said “require” 
before).  “require_once” generates a “Fatal error” if inclusion fails.  The 
stack trace produced and a potential custom exception shows the problem and 
where it originated.
 
>> […]  *IOW, [with an autoloader] dependencies would not have had to be
>> resolved manually, with the potential of failure.*
> 
> And potentially cause even worse problems.

In your wet dreams.
 
>>> It's all too easy to load the wrong class.
>> 
>> AISB, this is only a problem for the incompetent.
>> 
>> One simply does not have *multiple* classes with the *same* name in the
>> *same* namespace loaded in the *same* program/application, because *PHP
>> does not allow it* – autoloader or not.  Because of this, one also simply
>> does not have *multiple* classes with the *same* name in the *same*
>> directory to begin with.  Where multiple versions are available, they are
>> supposed to be in different directories or different namespaces, and in
>> different revisions of a VCS, to be checked out on an as-needed basis (as
>> Matthew already indicated).
>> 
>> Only the *utterly incompetent* would do otherwise.
> 
> Well, then I guess there are millions of "incompetent" programmers out
> there, according to your definition. 

There probably are (there are always millions of people incompetent in a 
field against a few competent ones), but not according to the definition 
above.

You simply cannot read carefully.  Because you do not want to.

> Because programmers all over the world have multiple versions of software
> on their systems.

The part that you *still* do seem to get is that there is a difference 
between having several versions, using several versions, and loading several 
versions.  You "overlooked" “different directories”, too.

Enough of your hot air.  Put your money where your big mouth is.  Unless you 
can present an easily reproducible, *real-world* example – and I mean 
*files* of *PHP source code*, at least one program file and two class 
files –, where *properly* using an autoloader in a *proper* setup (as I 
described) would cause *new* problems that would *not* exist without using 
an autoloader (you need to describe those problems in sufficient detail, 
then; no wild assumptions), EOD for me.
 
-- 
PointedEars
Zend Certified PHP Engineer 
<http://www.zend.com/en/yellow-pages/ZEND024953> | Twitter: @PointedEars2
Please do not cc me. / Bitte keine Kopien per E-Mail.

Back to comp.lang.php | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Class 'Model' not found M desinger <info.nez@gmail.com> - 2016-08-21 07:35 -0700
  Re: Class 'Model' not found M desinger <info.nez@gmail.com> - 2016-08-21 07:36 -0700
  Re: Class 'Model' not found M desinger <info.nez@gmail.com> - 2016-08-21 07:43 -0700
    Re: Class 'Model' not found "J.O. Aho" <user@example.net> - 2016-08-21 18:08 +0200
      Re: Class 'Model' not found "Christoph M. Becker" <cmbecker69@arcor.de> - 2016-08-21 19:36 +0200
    Re: Class 'Model' not found Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-08-22 20:56 +0200
      Re: Class 'Model' not found Jerry Stuckle <jstucklex@attglobal.net> - 2016-08-22 19:08 -0400
        Re: Class 'Model' not found Matthew Carter <m@ahungry.com> - 2016-08-23 01:23 -0400
          Re: Class 'Model' not found Jerry Stuckle <jstucklex@attglobal.net> - 2016-08-23 08:07 -0400
            Re: Class 'Model' not found Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-08-27 14:26 +0200
              Re: Class 'Model' not found Jerry Stuckle <jstucklex@attglobal.net> - 2016-08-27 10:13 -0400
                Re: Class 'Model' not found Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-08-28 02:12 +0200
                Re: Class 'Model' not found Jerry Stuckle <jstucklex@attglobal.net> - 2016-08-27 20:32 -0400
              Re: Class 'Model' not found Matthew Carter <m@ahungry.com> - 2016-08-28 00:00 -0400
                Re: Class 'Model' not found Jerry Stuckle <jstucklex@attglobal.net> - 2016-08-28 08:40 -0400
                Re: Class 'Model' not found Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-08-30 11:39 +0200
                Re: Class 'Model' not found Jerry Stuckle <jstucklex@attglobal.net> - 2016-08-30 07:41 -0400
                Re: Class 'Model' not found Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-08-30 14:41 +0200
                Re: Class 'Model' not found Jerry Stuckle <jstucklex@attglobal.net> - 2016-08-30 09:02 -0400
                Re: Class 'Model' not found Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-08-30 15:36 +0200
                Re: Class 'Model' not found Jerry Stuckle <jstucklex@attglobal.net> - 2016-08-30 10:39 -0400
                Re: Class 'Model' not found Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-08-30 11:35 +0200
  Re: Class 'Model' not found M desinger <info.nez@gmail.com> - 2016-08-30 14:25 -0700
    Re: Class 'Model' not found Gregor Kofler <usenet@gregorkofler.com> - 2016-08-31 00:35 +0200
      Re: Class 'Model' not found M desinger <info.nez@gmail.com> - 2016-08-30 16:34 -0700
        Re: Class 'Model' not found Jerry Stuckle <jstucklex@attglobal.net> - 2016-08-30 19:58 -0400

csiph-web