The PHP function below is producing this error: Parse error: syntax error, unexpected '(', expecting T_STRING or T_VARIABLE or '$', on this line that contens this code:$obj = new ( );
Does anyone know what's wrong?
function createContextAwareObjectOfClass($className) {
$className;
$obj = new ( );
IApplicationContextAware;
if (!( $obj instanceof null )) {
Exception;
throw new ( '' . 'Non-context aware class "' . $className . '" passed to createContextAwareObjectOfClass' );
}
$obj->setAppContext( $this );
return $obj;
}