Please enable JavaScript to use regex101
/
^
r
e
g
e
x
[
\
-
_
]
?
1
0
1
$
/
i
Reg
ular
Ex
pressions
101
Reg
ular
Ex
pressions
101
Upgrade to Pro
Enterprise
Regular Expression
/
('template_path_stack' => )(\[((?>[^\[\]]++|(?2))*)\])
/
gm
Input 1
1
New
<?php namespace Application; use Laminas\Router\Http\Literal; use Laminas\Router\Http\Segment; use Laminas\ServiceManager\Factory\InvokableFactory; return [ 'view_manager' => [ 'template_path_stack' => [ __DIR__ . '/../view', __DIR__ . '/../view/Application/_shared' ], ], 'controllers' => [ 'factories' => [ dsdsa ] ], 'service_manager' => [ 'factories' => [ 'UsersTableGateway' => function ($sm) { $dbAdapter = $sm->get('Laminas\Db\Adapter\Adapter'); $resultSetPrototype = new \Laminas\Db\ResultSet\ResultSet(); //get base url from config $config = $sm->get('Config'); $baseUrl = $config['view_manager']['base_url']; //pass base url via cnstructor to the User class $resultSetPrototype->setArrayObjectPrototype(new Model\Rowset\User($baseUrl)); return new Utils\TableGateway('users', $dbAdapter, null, $resultSetPrototype); }, 'Application\Model\UsersTable' => function($sm) { $tableGateway = $sm->get('UsersTableGateway'); $table = new Model\UsersTable($tableGateway); return $table; }, Utils\Authentication::class => function($sm) { $auth = new Utils\Authentication( $sm->get(\Laminas\Db\Adapter\Adapter::class), $sm->get(Utils\Adapter::class) ); return $auth; }, Utils\Helper::class => InvokableFactory::class, SessionManager::class => function ($container) { $config = $container->get('config'); $session = $config['session']; $sessionConfig = new $session['config']['class'](); $sessionConfig->setOptions($session['config']['options']); $sessionManager = new Session\SessionManager( $sessionConfig, new $session['storage'](), null ); \Laminas\Session\Container::setDefaultManager($sessionManager); return $sessionManager; }, ], ], ];
Extraction