XPlanner::Object - Base class for all XPlanner objects


XPlanner documentation Contained in the XPlanner distribution.

Index


Code Index:

NAME

Top

XPlanner::Object - Base class for all XPlanner objects

SYNOPSIS

Top

  # No user servicable parts inside.  Go away


XPlanner documentation Contained in the XPlanner distribution.

package XPlanner::Object;

use strict;


sub _map_from_soap {
    my($self, $key, $proxy_method, $class) = @_;
    my $proxy = $self->{_proxy};

    # Everything has an id except for the project itself.
    my @proxy_args;
    @proxy_args = $self->{id} unless $self->isa('XPlanner');

    eval "require $class";
    my %mapped_objects = map { $_->{_proxy} = $self->{_proxy};
                               $_->{$key} => $_
                             } @{$proxy->$proxy_method(@proxy_args)->result};

    return \%mapped_objects;
}


sub _init {
    my($class, %args) = @_;

    bless \%args, $class->_proxy_class;
}


1;