private function renderObjects($withNamespace)
    {
        $code = array();
        foreach ($this->getObjects() as $object) {
            $originalUses = $object->getUses();
            $object->setUses(array());
            if ($withNamespace === false) {
                $originalNamespace = $object->getNamespace();
                $object->setNamespace(null);
                $code[] = $object->generate();
                $object->setNamespace($originalNamespace);
            } else {
                $code[] = $object->generate();
            }

            $object->setUses($originalUses);
            $code[] = null;
        }

        return $code;
    }