470,848 Members | 1,111 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,848 developers. It's quick & easy.

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 AlbumOptionsView.. both
AlbumOptionsView and PaginationView seem to exist with no problem,
however, if I do this:

[PHP]
class AlbumOptionsView extends OptionsView {
//
}
[/PHP]

I get this error:


Fatal error: Class albumoptionsview: 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
Jul 17 '05 #1
1 1705
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

http://www.tonymarston.net

"Phil Powell" <so*****@erols.com> wrote in message
news:1c**************************@posting.google.c om...
[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 AlbumOptionsView.. both
AlbumOptionsView and PaginationView seem to exist with no problem,
however, if I do this:

[PHP]
class AlbumOptionsView extends OptionsView {
//
}
[/PHP]

I get this error:

>
Fatal error: Class albumoptionsview: 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

Jul 17 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

24 posts views Thread by DaKoadMunky | last post: by
6 posts views Thread by LRW | last post: by
19 posts views Thread by E. Robert Tisdale | last post: by
17 posts views Thread by Steve R. Hastings | last post: by
1 post views Thread by tshad | last post: by
8 posts views Thread by Floortje | last post: by
16 posts views Thread by John Doe | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.