Skip to content

Instantly share code, notes, and snippets.

@basz
Created January 12, 2016 14:29
Show Gist options
  • Select an option

  • Save basz/28f432a2747b21dd8be0 to your computer and use it in GitHub Desktop.

Select an option

Save basz/28f432a2747b21dd8be0 to your computer and use it in GitHub Desktop.
public function hasUse($use)
{
$uses = array_values($this->uses);
foreach($this->uses as $key=>$value) {
$parts = explode(' ', $value);
if ($parts[0] === $use) {
return true;
}
}
return false;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment