Skip to content

Instantly share code, notes, and snippets.

@drmmr763
Created September 16, 2014 14:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save drmmr763/3c3b6b8f0e6bdb9ebadd to your computer and use it in GitHub Desktop.
Save drmmr763/3c3b6b8f0e6bdb9ebadd to your computer and use it in GitHub Desktop.
JRegistry Code-Around
<?php
public function getItem()
{
$eventRegistry = new JRegistry();
$eventRegistry->loadString($this->getEventBriteIds());
$validEvent = true;
$eventRegistryIterator = 0;
// this will be a loop
while($validEvent)
{
// check that key exists
if (!$eventRegistry[$eventRegistryIterator])
{
$validEvent = false; // break the loop otherwise
break;
}
// do stuff
}
return;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment