Skip to content

Instantly share code, notes, and snippets.

@jmas
Created February 2, 2014 23:12
Show Gist options
  • Save jmas/8776428 to your computer and use it in GitHub Desktop.
Save jmas/8776428 to your computer and use it in GitHub Desktop.
$items = array(); // Items for return
$existsPlugins = array( ... ); // Exists plugins
$remoteFiles = array( ... ); // Remote plugins
foreach ($remoteFiles as file) {
if (strpos('-flexio-plugin', $file['name']) === false) {
continue;
}
$founded = false;
$pluginName = basename($file['name'], '-flexio-plugin');
foreach ($existsPlugin as $p) {
if ($p->getName() === $pluginName) {
$founded = true;
}
}
if ($founded) {
continue;
}
$items[] = array(
'name'=>$pluginName,
'repoUrl'=>$file['repo_url'],
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment