-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
724 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
254 changes: 254 additions & 0 deletions
254
flow/9.0/Neos/Flow/Mvc/Routing/AttributeRoutesProvider.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 "Action" 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 "Controller"), | ||
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 "Action". | ||
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> |
Oops, something went wrong.