<?php
/**
 * Global Configuration Override
 *
 * You can use this file for overriding configuration values from modules, etc.
 * You would place values in here that are agnostic to the environment and not
 * sensitive to security.
 *
 * @NOTE: In practice, this file will typically be INCLUDED in your source
 * control, so do not include passwords or other sensitive information in this
 * file.
 */
return array(
	'service_manager' => array(
		'factories' => array(
			'Zend\Db\Adapter\Adapter' => 'Zend\Db\Adapter\AdapterServiceFactory',
		),
	),
	// Конфигурация БД
	'db' => array(
		'driver' => 'Pdo',
		'dsn' => 'mysql:dbname=zftest;host=localhost',
		'driver_options' => array(
			PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES \'UTF8\''
		),
	),
	// ACL Roles: role_name => parent_roles
	'acl_roles' => array(
		'guest' => array(),
		'authenticated' => array('guest'),
		'admin' => array('authenticated')
	),
	// ACL Resources: route =>
	'acl_resources' => array(
		'home' => array(
			'allow' => array('all'),
		),
		'admin' => array(
			'allow' => array('admin'),
		),
		'admin/login' => array(
			'allow' => array('guest'),
		),
		'admin/logout' => array(
			'allow' => array('authenticated'),
		),
		'admin/users' => array(
			'allow' => array('admin')
		),
		'admin/users/edit' => array(
			'allow' => array('admin')
		),
		'admin/users/remove' => array(
			'allow' => array('admin')
		)
	),
	// Конфигурация навигации
	'navigation' => array(
		'admin_top'	=> array(
			array(
				'label' => _t('Home'),
				'route' => 'admin',
				'resource' => 'admin',
			),
			array(
				'label' => _t('Users'),
				'route' => 'admin/users',
				'resource' => 'admin/users',
				'pages'	=> array(
					array(
						'label'	=> 'User edit',
						'route'	=> 'admin/users/edit',
						'resource'	=> 'admin/users/edit',
						'visible'	=> false,
					),
				),
			),
		),
	),
);
