Writing values for a new package

Permalink
Hi everybody:
I'm writing a package to be used as a basic template for building new packages, and I'd like to know what you think about placing default values ($pkgHandle, $appVersionRequired, $pkgVersion, $blockHandle, etc) in a new file out of controller.php. So, controller.php will be used only for the functions, and this new file would have the package's parameters.
I'm thinking about to write these values in a new class (configDataPackage, for instance), but I think there are many other options, and I want to choose the best one. Suggestions are accepted.

My second doubt is: Would it be accepted by the PRB team?

Arequal
 
Mnkras replied on at Permalink Reply
Mnkras
I don't think that will work so well.

In a package controller, the class name, and $pkgHandle vars are extremely important that they be in the controller.php.

As for your second doubt, depending on how you do it, it may or may not be accepted, but I am more inclined to say it would not be accepted.

Mike
Arequal replied on at Permalink Reply
Arequal
Yeah, you're right, these data are crucial, but I'd rather not to "scramble" them with pieces which don't need to be changed. Even these pieces (functions) should work only if these "default data" exist.
For instance: If you set a var $themesToBeInstalled = array(blahblabhla) then the controller's function which installs new themes would be executed. So don't touch controller.php and write down every parameter in myconfig.php (for instance)

My package is a template, so I try to write as much functionality as I can, then the resulting controller.php file is too long and has many default values I'd like to move away. It's for the sake of cleanliness.

And yes, I agree it wouldn't be accepted. Is there any way to propose to the C5 Jedi Council this issue?
Mnkras replied on at Permalink Best Answer Reply
Mnkras
If I understand correctly, (psuedo code)

class SomePackage {
public function install() {
    Loader::model('install', $this->pkgHandle);
    Install::install();
}
}


where the install class has all that info and is located in /some/models/install.php

Is that what you mean?
Arequal replied on at Permalink Reply
Arequal
It's exactly what I mean, and it was the choice I was thinking over, but I wanted to get more different opinions. If no more betting, I'll take it