editing registry.php directly

Sebastian Birnbach <[email protected]> Tue, 29 Nov 2016 17:10:09 +0100
Newsgroups gmane.comp.horde.devel
Message-ID <CACTNBFMQ_6ALySM9vKYp+bBZ9fSJpVdGhG8o94Opb-x4z7gMVg@mail.gmail.com>
To change the order of entries in the topbar, I wrote some code for
registry.local.php. It stores the items, removes them and puts them back in
an order I like better:

$wicked = $this->applications['wicked'];
$turba = $this->applications['turba'];
$nag = $this->applications['nag'];

unset ($this->applications['wicked']);
unset ($this->applications['turba']);
unset ($this->applications['nag']);

$this->applications['turba'] = $turba;
$this->applications['nag'] = $nag;
$this->applications['wicked'] = $wicked;

The code works nicely but I am concerned about performance as it may be
executed once upon every request.


Question 1: is it any better to put this code in config/registry.d/foo.php,
which file will not be re-read upon every request?

Question 2: is it acceptable to edit registry.php directly to obtain the
desired order? I suspect one main reason for prohibiting editing
registry.php is that it may be parsed and manipulated. The parsing routines
should not rely on the order of the entries, do they?


Kind regards

  Sebastian
-- 
dev mailing list
Frequently Asked Questions: http://wiki.horde.org/FAQ
To unsubscribe, mail: [email protected]