@@ 336-345 (lines=10) @@ | ||
333 | $exists = (class_exists($type) || interface_exists($type)); |
|
334 | if ($exists) { |
|
335 | $classname = $type; |
|
336 | } else { |
|
337 | $classname = $this->resolve($type); |
|
338 | ||
339 | $exists = (class_exists($classname) || interface_exists($classname)); |
|
340 | if (!$exists) { |
|
341 | throw new InvalidArgumentException( |
|
342 | sprintf('Can not set "%s" as base class: Invalid class or interface name.', $classname) |
|
343 | ); |
|
344 | } |
|
345 | } |
|
346 | ||
347 | $this->baseClass = $classname; |
|
348 | ||
@@ 376-386 (lines=11) @@ | ||
373 | ); |
|
374 | } |
|
375 | ||
376 | if (class_exists($type)) { |
|
377 | $classname = $type; |
|
378 | } else { |
|
379 | $classname = $this->resolve($type); |
|
380 | ||
381 | if (!class_exists($classname)) { |
|
382 | throw new InvalidArgumentException( |
|
383 | sprintf('Can not set "%s" as defaut class: Invalid class name.', $classname) |
|
384 | ); |
|
385 | } |
|
386 | } |
|
387 | ||
388 | $this->defaultClass = $classname; |
|
389 |