Defined class becomes undefined

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Phil Powell

    Defined class becomes undefined

    [PHP]
    class OptionsView extends PaginationView {

    /**
    * Constructor
    *
    * @access public
    */
    function OptionsView() {} // CONSTRUCTOR

    }
    [/PHP]

    This class exists in the same script as both the parent class
    PaginationView and its child class AlbumOptionsVie w.. both
    AlbumOptionsVie w and PaginationView seem to exist with no problem,
    however, if I do this:

    [PHP]
    class AlbumOptionsVie w extends OptionsView {
    //
    }
    [/PHP]

    I get this error:


    Fatal error: Class albumoptionsvie w: Cannot inherit from undefined
    class optionsview in /catalog/include/classes.inc.php on line 105
    Could someone shed some light onto this? How can a class be undefined
    in the same instance as its parent and child?

    Phil
  • Tony Marston

    #2
    Re: Defined class becomes undefined

    You have got

    class OptionsView extends PaginationView {

    but where is class PaginationView defined?

    You must define a class before you can extend it.

    --
    Tony Marston

    This is Tony Marston's web site, containing personal information plus pages devoted to the Uniface 4GL development language, XML and XSL, PHP and MySQL, and a bit of COBOL




    "Phil Powell" <soazine@erols. com> wrote in message
    news:1cdca2a7.0 408021446.7837a 9b1@posting.goo gle.com...[color=blue]
    > [PHP]
    > class OptionsView extends PaginationView {
    >
    > /**
    > * Constructor
    > *
    > * @access public
    > */
    > function OptionsView() {} // CONSTRUCTOR
    >
    > }
    > [/PHP]
    >
    > This class exists in the same script as both the parent class
    > PaginationView and its child class AlbumOptionsVie w.. both
    > AlbumOptionsVie w and PaginationView seem to exist with no problem,
    > however, if I do this:
    >
    > [PHP]
    > class AlbumOptionsVie w extends OptionsView {
    > //
    > }
    > [/PHP]
    >
    > I get this error:
    >
    >
    >
    > Fatal error: Class albumoptionsvie w: Cannot inherit from undefined
    > class optionsview in /catalog/include/classes.inc.php on line 105
    >
    >
    > Could someone shed some light onto this? How can a class be undefined
    > in the same instance as its parent and child?
    >
    > Phil[/color]


    Comment

    Working...