mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
ddcfcf7bed
Cleanup of framework's use of @package and @subpackage labels and additional of labels for classes missing packages. Moved all GridField related components to the one name. Countless spelling fixes, grammar for other comments. Link ClassName references in file headers.
22 lines
476 B
PHP
22 lines
476 B
PHP
<?php
|
|
|
|
/**
|
|
* @package framework
|
|
* @subpackage injector
|
|
*/
|
|
|
|
class SilverStripeInjectionCreator {
|
|
/**
|
|
*
|
|
* @param string $object
|
|
* A string representation of the class to create
|
|
* @param array $params
|
|
* An array of parameters to be passed to the constructor
|
|
*/
|
|
public function create($class, $params = array()) {
|
|
$class = Object::getCustomClass($class);
|
|
$reflector = new ReflectionClass($class);
|
|
|
|
return $reflector->newInstanceArgs($params);
|
|
}
|
|
} |