"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/View/Form/ContextFactory.php" between
cakephp-4.2.2.tar.gz and cakephp-4.2.3.tar.gz

About: CakePHP is a rapid development framework for PHP applications. Source code.

ContextFactory.php  (cakephp-4.2.2):ContextFactory.php  (cakephp-4.2.3)
skipping to change at line 139 skipping to change at line 139
} }
/** /**
* Find the matching context for the data. * Find the matching context for the data.
* *
* If no type can be matched a NullContext will be returned. * If no type can be matched a NullContext will be returned.
* *
* @param \Cake\Http\ServerRequest $request Request instance. * @param \Cake\Http\ServerRequest $request Request instance.
* @param array $data The data to get a context provider for. * @param array $data The data to get a context provider for.
* @return \Cake\View\Form\ContextInterface Context provider. * @return \Cake\View\Form\ContextInterface Context provider.
* @throws \RuntimeException When a context instace cannot be generated for given entity. * @throws \RuntimeException When a context instance cannot be generated for given entity.
*/ */
public function get(ServerRequest $request, array $data = []): ContextInterf ace public function get(ServerRequest $request, array $data = []): ContextInterf ace
{ {
$data += ['entity' => null]; $data += ['entity' => null];
foreach ($this->providers as $provider) { foreach ($this->providers as $provider) {
$check = $provider['callable']; $check = $provider['callable'];
$context = $check($request, $data); $context = $check($request, $data);
if ($context) { if ($context) {
break; break;
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)