public function __construct( $copy = NULL ) { parent::__construct( array( 'title' => 'string', 'link' => 'string', 'description' => 'string', 'language' => 'string', 'lastBuildDate' => 'string' ) ); if( is_array( $copy ) ) { $this->fromArray( $copy ); } else if( $copy ) { $this->fromXML( $copy ); } }
public function __construct( $copy = NULL ) { parent::__construct( array( 'title' => 'string', 'link' => 'string', 'description' => 'string', 'pubDate' => 'string' ) ); if( is_a( $copy, get_class( $this ) ) ) { $this->fromCopy( $copy ); } else if( is_array( $copy ) ) { $this->fromArray( $copy ); } else if( $copy ) { $this->fromXML( $copy ); } }