protected function applyServices(stdClass $config) {
		foreach ($config as $id => $definitionConf) {
			if (! isset($definitionConf->type)) {
				throw new Exceptions\InvalidConfig('Service definition must contain a "type" property"');
			}
			
			if ($definitionConf->type === 'class') {
				if (! isset($definitionConf->class)) {
					throw new Exceptions\InvalidConfig('Service definition of type "class" must contain a "class" property');
				}
				
				$definition = new Definition\ClassDefinition($definitionConf->class);
				
				if (! empty($definitionConf->factory)) {
					$definition->setFactoryMode();
				}
				
				if (isset($definitionConf->arguments)) {
					$args = $this->processArguments($definitionConf->arguments);
					
					$definition->setArguments($args);
				}
				
				$this->container->set($id, $definition);
				continue;
			}
			
			throw new Exceptions\InvalidConfig('Unknown type of service: "' . $definitionConf->type . '"');
		}
	}