public function create(Config $config)
{
$this->acl = new MemoryAdapter();
$this->config = $config;
$defaultAction = $this->config->get('defaultAction');
if (!is_int($defaultAction) && !ctype_digit($defaultAction)) {
throw new Exception('Key "defaultAction" must exist and must be of numeric value.');
}
$this->acl->setDefaultAction((int) $defaultAction);
$this->addResources();
$this->addRoles();
return $this->acl;
}