public function constructorArgs($arguments)
    {
        $constructArguments = array();

        if (is_array($arguments)) {
            foreach ($arguments as $argument) {
                if (is_array($argument)) {
                    if ($argument['type'] == 'datetime') {
                        $constructArguments[] = new \DateTime($argument['value']);
                    } elseif ($argument['type'] == 'reference') {
                        $constructArguments[] = $this->loader->getReference($argument['value']);
                    } else {
                        $constructArguments[] = $argument['value'];
                    }
                } else {
                    $constructArguments[] = $argument;
                }
            }
        } else {
            $constructArguments[] = $arguments;
        }

        return $constructArguments;
    }