Skip to content

Instantly share code, notes, and snippets.

@Majkl578
Created April 5, 2012 20:58
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 Majkl578/2314146 to your computer and use it in GitHub Desktop.
Save Majkl578/2314146 to your computer and use it in GitHub Desktop.
<?php
if (is_array($value) && (!isset($value['class']) || !is_scalar($value['class']))) {
throw new \InvalidArgumentException("Repository $name doesn't have defined 'class' parameter");
}
$className = is_array($value) ? $value['class'] : $value;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment