Skip to content

Commit

Permalink
TASK: Update API docs from 9.0
Browse files Browse the repository at this point in the history
  • Loading branch information
neos-bot committed Mar 28, 2024
1 parent 82511d4 commit 1965d3f
Show file tree
Hide file tree
Showing 15 changed files with 724 additions and 14 deletions.
4 changes: 2 additions & 2 deletions flow/9.0/Neos/Flow/Configuration/Loader/RoutesLoader.html
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ <h4>Return Value</h4>
</div>
<div class="method-item">
<h3 id="method_mergeRoutesWithSubRoutes">
<div class="location"><a href="https://github.com/neos/flow-development-collection/blob/9.0/Neos.Flow/Classes/Configuration/Loader/RoutesLoader.php#L121">at line 121</a></div>
<div class="location"><a href="https://github.com/neos/flow-development-collection/blob/9.0/Neos.Flow/Classes/Configuration/Loader/RoutesLoader.php#L129">at line 129</a></div>
<code> protected array
<strong>mergeRoutesWithSubRoutes</strong>(array $packages, <a href="../../../../Neos/Flow/Core/ApplicationContext.html"><abbr title="Neos\Flow\Core\ApplicationContext">ApplicationContext</abbr></a> $context, array $routesConfiguration, int $subRoutesRecursionLevel = 0)
</code>
Expand Down Expand Up @@ -388,7 +388,7 @@ <h4>Exceptions</h4>
</div>
<div class="method-item">
<h3 id="method_buildSubRouteConfigurations">
<div class="location"><a href="https://github.com/neos/flow-development-collection/blob/9.0/Neos.Flow/Classes/Configuration/Loader/RoutesLoader.php#L174">at line 174</a></div>
<div class="location"><a href="https://github.com/neos/flow-development-collection/blob/9.0/Neos.Flow/Classes/Configuration/Loader/RoutesLoader.php#L186">at line 186</a></div>
<code> protected array
<strong>buildSubRouteConfigurations</strong>(array $routesConfiguration, array $subRoutesConfiguration, string $subRouteKey, array $subRouteOptions)
</code>
Expand Down
16 changes: 16 additions & 0 deletions flow/9.0/Neos/Flow/Mvc/Routing.html
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,16 @@ <h2>Classes</h2>
<div class="col-md-6">
<a href="../../../Neos/Flow/Mvc/Routing/AbstractRoutePart.html"><abbr title="Neos\Flow\Mvc\Routing\AbstractRoutePart">AbstractRoutePart</abbr></a> </div>
<div class="col-md-6"><p>abstract Route Part</p></div>
</div>
<div class="row">
<div class="col-md-6">
<a href="../../../Neos/Flow/Mvc/Routing/AttributeRoutesProvider.html"><abbr title="Neos\Flow\Mvc\Routing\AttributeRoutesProvider">AttributeRoutesProvider</abbr></a> </div>
<div class="col-md-6"><p>Allows to annotate controller methods with route configurations</p></div>
</div>
<div class="row">
<div class="col-md-6">
<a href="../../../Neos/Flow/Mvc/Routing/AttributeRoutesProviderFactory.html"><abbr title="Neos\Flow\Mvc\Routing\AttributeRoutesProviderFactory">AttributeRoutesProviderFactory</abbr></a> </div>
<div class="col-md-6"></div>
</div>
<div class="row">
<div class="col-md-6">
Expand Down Expand Up @@ -191,6 +201,12 @@ <h2>Interfaces</h2>
<em><a href="../../../Neos/Flow/Mvc/Routing/RouterInterface.html"><abbr title="Neos\Flow\Mvc\Routing\RouterInterface">RouterInterface</abbr></a></em>
</div>
<div class="col-md-6"><p>Contract for a Web Router</p></div>
</div>
<div class="row">
<div class="col-md-6">
<em><a href="../../../Neos/Flow/Mvc/Routing/RoutesProviderFactoryInterface.html"><abbr title="Neos\Flow\Mvc\Routing\RoutesProviderFactoryInterface">RoutesProviderFactoryInterface</abbr></a></em>
</div>
<div class="col-md-6"></div>
</div>
<div class="row">
<div class="col-md-6">
Expand Down
254 changes: 254 additions & 0 deletions flow/9.0/Neos/Flow/Mvc/Routing/AttributeRoutesProvider.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,254 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="robots" content="index, follow, all" />
<title>Neos\Flow\Mvc\Routing\AttributeRoutesProvider | Flow Framework</title>

<link rel="stylesheet" type="text/css" href="../../../../css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="../../../../css/bootstrap-theme.min.css">
<link rel="stylesheet" type="text/css" href="../../../../css/doctum.css">
<link rel="stylesheet" type="text/css" href="../../../../fonts/doctum-font.css">
<script src="../../../../js/jquery-3.5.1.slim.min.js"></script>
<script async defer src="../../../../doctum.js"></script>
<script async defer src="../../../../js/bootstrap.min.js"></script>
<script async defer src="../../../../js/autocomplete.min.js"></script>
<meta name="MobileOptimized" content="width">
<meta name="HandheldFriendly" content="true">
<meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1">
<link rel="shortcut icon" href="https://www.neos.io/favicon-32x32.png" />
<link rel="search"
type="application/opensearchdescription+xml"
href="https://neos.github.io/opensearch.xml"
title="Flow Framework (9.0)" />
</head>

<body id="class" data-name="class:Neos_Flow_Mvc_Routing_AttributeRoutesProvider" data-root-path="../../../../" data-search-index-url="../../../../doctum-search.json">
<div id="content">
<div id="left-column">
<div id="control-panel">
<div class="search-bar hidden" id="search-progress-bar-container">
<div class="progress">
<div class="progress-bar" role="progressbar" id="search-progress-bar"
aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" style="width: 0%"></div>
</div>
</div>
<form id="search-form" action="../../../../search.html">
<span class="icon icon-search"></span>
<input name="search"
id="doctum-search-auto-complete"
class="typeahead form-control"
type="search"
placeholder="Search"
spellcheck="false"
autocorrect="off"
autocomplete="off"
autocapitalize="off">
<div class="auto-complete-results" id="auto-complete-results"></div>
</form>
</div>

<div id="api-tree"></div>

</div>
<div id="right-column">
<nav id="site-nav" class="navbar navbar-default" role="navigation">
<div class="container-fluid">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar-elements">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="../../../../index.html">Flow Framework</a>
</div>
<div class="collapse navbar-collapse" id="navbar-elements">
<ul class="nav navbar-nav">
<li><a href="../../../../classes.html">Classes</a></li>
<li><a href="../../../../namespaces.html">Namespaces</a></li>
<li><a href="../../../../interfaces.html">Interfaces</a></li>
<li><a href="../../../../traits.html">Traits</a></li>
<li><a href="../../../../doc-index.html">Index</a></li>
<li><a href="../../../../search.html">Search</a></li>
</ul>
</div>
</div>
</nav>

<div class="namespace-breadcrumbs">
<ol class="breadcrumb">
<li><span class="label label-default">class</span></li>
<li><a href="../../../../Neos.html">Neos</a></li><li class="backslash">\</li><li><a href="../../../../Neos/Flow.html">Flow</a></li><li class="backslash">\</li><li><a href="../../../../Neos/Flow/Mvc.html">Mvc</a></li><li class="backslash">\</li><li><a href="../../../../Neos/Flow/Mvc/Routing.html">Routing</a></li><li class="backslash">\</li><li>AttributeRoutesProvider</li>
</ol>
</div>
<div id="page-content">
<div class="page-header">
<h1>AttributeRoutesProvider
</h1>
</div>


<p>final class
<strong>AttributeRoutesProvider</strong> implements <a href="../../../../Neos/Flow/Mvc/Routing/RoutesProviderInterface.html"><abbr title="Neos\Flow\Mvc\Routing\RoutesProviderInterface">RoutesProviderInterface</abbr></a> (<a href="https://github.com/neos/flow-development-collection/blob/9.0/Neos.Flow/Classes/Mvc/Routing/AttributeRoutesProvider.php">View source</a>)
</p>





<div class="description">
<p><p>Allows to annotate controller methods with route configurations</p></p> <p><h2>Internal implementation:</h2>
<p>Flows routing configuration is declared via \@package, \@subpackage, \@controller and \@action
The first three options will resolve to a fully qualified class name {<a href="../../../../Neos/Flow/Mvc/ActionRequest.html">\Neos\Flow\Mvc\ActionRequest::getControllerObjectName()}
which</a> is instantiated in the dispatcher {[\Neos\Flow\Mvc\Dispatcher::dispatch()}</p>
<p>The](../../../../Neos/Flow/Mvc/Dispatcher.html) latter \@action option will be treated internally by each controller. From the perspective of the dispatcher \@action is just another routing value.
By convention during processRequest in the default ActionController {\ActionController::resolveActionMethodName()} will be used
to concatenate the &quot;Action&quot; suffix to the action name
and {<a href="../../../../Neos/Flow/Mvc/Controller/ActionController.html">\Neos\Flow\Mvc\Controller\ActionController::callActionMethod()}</a> will invoke the method internally with prepared method arguments.</p>
<p>Creating routes by annotation must make a few assumptions to work:</p>
<ol>
<li>
<p>As not every FQ class name is representable via the routing configuration (e.g. the class has to end with &quot;Controller&quot;),
only classes can be annotated that reside in a correct location and have the correct suffix.
Otherwise, an exception will be thrown as the class is not discoverable by the dispatcher.</p>
</li>
<li>
<p>As the ActionController requires a little magic and is the main use case we currently only support this controller.
For that reason it is validated that the annotation is inside an ActionController and the method ends with &quot;Action&quot;.
The routing value with the suffix trimmed will be generated:</p>
<p>class MyThingController extends ActionController
{</p>
<h1>[Flow\Route(path: 'foo')]</h1>
<pre><code>public function someAction()
{
}</code></pre>
<p>}</p>
</li>
</ol>
<p>The example will genrate the configuration:</p>
<pre><code>\@package My.Package
\@controller MyThing
\@action some</code></pre>
<p>TODO for a future scope of <code>Flow\Action</code> see <a href="https://github.com/neos/flow-development-collection/issues/3335">https://github.com/neos/flow-development-collection/issues/3335</a></p></p> </div>




<h2>Methods</h2>

<div class="container-fluid underlined">
<div class="row">
<div class="col-md-2 type">

</div>
<div class="col-md-8">
<a href="#method___construct">__construct</a>(<a href="../../../../Neos/Flow/Reflection/ReflectionService.html"><abbr title="Neos\Flow\Reflection\ReflectionService">ReflectionService</abbr></a> $reflectionService, <a href="../../../../Neos/Flow/ObjectManagement/ObjectManagerInterface.html"><abbr title="Neos\Flow\ObjectManagement\ObjectManagerInterface">ObjectManagerInterface</abbr></a> $objectManager, array $classNames)

<p class="no-description">No description</p>
</div>
<div class="col-md-2"></div>
</div>
<div class="row">
<div class="col-md-2 type">
<a href="../../../../Neos/Flow/Mvc/Routing/Routes.html"><abbr title="Neos\Flow\Mvc\Routing\Routes">Routes</abbr></a>
</div>
<div class="col-md-8">
<a href="#method_getRoutes">getRoutes</a>()

<p class="no-description">No description</p>
</div>
<div class="col-md-2"></div>
</div>
</div>


<h2>Details</h2>

<div id="method-details">
<div class="method-item">
<h3 id="method___construct">
<div class="location"><a href="https://github.com/neos/flow-development-collection/blob/9.0/Neos.Flow/Classes/Mvc/Routing/AttributeRoutesProvider.php#L71">at line 71</a></div>
<code>
<strong>__construct</strong>(<a href="../../../../Neos/Flow/Reflection/ReflectionService.html"><abbr title="Neos\Flow\Reflection\ReflectionService">ReflectionService</abbr></a> $reflectionService, <a href="../../../../Neos/Flow/ObjectManagement/ObjectManagerInterface.html"><abbr title="Neos\Flow\ObjectManagement\ObjectManagerInterface">ObjectManagerInterface</abbr></a> $objectManager, array $classNames)
</code>
</h3>
<div class="details">



<div class="method-description">
<p class="no-description">No description</p>

</div>
<div class="tags">
<h4>Parameters</h4>

<table class="table table-condensed">
<tr>
<td><a href="../../../../Neos/Flow/Reflection/ReflectionService.html"><abbr title="Neos\Flow\Reflection\ReflectionService">ReflectionService</abbr></a></td>
<td>$reflectionService</td>
<td></td>
</tr>
<tr>
<td><a href="../../../../Neos/Flow/ObjectManagement/ObjectManagerInterface.html"><abbr title="Neos\Flow\ObjectManagement\ObjectManagerInterface">ObjectManagerInterface</abbr></a></td>
<td>$objectManager</td>
<td></td>
</tr>
<tr>
<td>array</td>
<td>$classNames</td>
<td></td>
</tr>
</table>





</div>
</div>

</div>
<div class="method-item">
<h3 id="method_getRoutes">
<div class="location"><a href="https://github.com/neos/flow-development-collection/blob/9.0/Neos.Flow/Classes/Mvc/Routing/AttributeRoutesProvider.php#L78">at line 78</a></div>
<code> <a href="../../../../Neos/Flow/Mvc/Routing/Routes.html"><abbr title="Neos\Flow\Mvc\Routing\Routes">Routes</abbr></a>
<strong>getRoutes</strong>()
</code>
</h3>
<div class="details">



<div class="method-description">
<p class="no-description">No description</p>

</div>
<div class="tags">

<h4>Return Value</h4>

<table class="table table-condensed">
<tr>
<td><a href="../../../../Neos/Flow/Mvc/Routing/Routes.html"><abbr title="Neos\Flow\Mvc\Routing\Routes">Routes</abbr></a></td>
<td></td>
</tr>
</table>




</div>
</div>

</div>
</div>


</div><div id="footer">
Generated by <a href="https://github.com/code-lts/doctum">Doctum, a API Documentation generator and fork of Sami</a>. <br/>Learn more about the <a href="https://flow.neos.io" rel="noreferrer noopener" target="_blank">Flow Framework</a> if you like!</div></div>
</div>
</body>

</html>
Loading

0 comments on commit 1965d3f

Please sign in to comment.