Jump to content

Objects as Object Attributes


froens

Recommended Posts

Hi there. I'm building a site where i'm trying to use the DOMApi supplied with PHP.

 

The basic idea is to make all my bricks as small xml-nodes that can be apprehended by others.

 

The problem is that i'm having problems with defining objects as attributes. I'm a bit rusty with the PHP-syntax so please bear over with me.

 

class Treatmentlist extends DOMNode

{

 

private $pDomL;

private $pParent;

 

private $pInitialized;

 

public function __construct($aParent)

{

$pParent = $aParent;

$pDom = $aParent->ownerDocument;

}

 

.... some other methods ...

 

}

 

The problem is that when I refer to $pDom, it doesn't recognize it as an object of the type DOMDocument.

 

What would solve my problem ?

Link to comment
https://forums.phpfreaks.com/topic/57628-objects-as-object-attributes/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.