Gaining access to an *AttributeTypeController and rendering a special form

Permalink
It's late. I'm tired. I hope this does not sound "mindless."

I run a perl script which gathers information and returns in the $output variable of a php exec(), a collection of various arrays.

Say I want to pass one of those arrays into a custom AttributeTypeController::form() Essentially, a $perlArray replacing the $value inside this code (which is typical C5 code setting a database value):
public function form() {
  if (is_object($this->attributeValue)) {
    $value = $this->getAttributeValue()->getValue();
    $this->set('key1', $value->getKey1()); 
    $this->set('key2',$value->getKey2());
  } 
}

Within the custom attribute's directory I can place a different "form.php" , say "special_form.php". Which I can then call with render('special_form') and display the key1 and key2 values I set to it, something like:
public function special_form($perlArray1, $perlArray2) {
    $this->set('key1', $perlArray1); 
    $this->set('key2', $perlArray2);
  } 
}

Unfortunately, I CANNOT just do:
Loader::model('attribute/types/special');
$atc = new SpecialAttributeTypeController();  //this fails
$atc->special_form($perlArray1, $perlArray2);


The failure is due to the parent AttributeTypeController __construct method needing an attributeType object passed in as a first parameter.

Tired and contemplating... I now see the render() I want to call is a method of the AttributeKey class.

How would you suggest the best way to get my perl obtained data into the C5 architecture so that it can be saved into a custom attribute's database?

EDIT #1: Note: I need to route this upload through each (there's about 20) custom attribute directory so as to minimize static code.

Ricalsin
 

This website stores cookies on your computer. These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media. To find out more about the cookies we use, see our Privacy Policy.