* @license GNU General Public License, version 2 (GPL-2.0) * * For full copyright and license information, please see * the docs/CREDITS.txt file. * */ namespace phpbb\controller; use Symfony\Component\HttpKernel\Controller\ControllerResolverInterface; use Symfony\Component\DependencyInjection\ContainerInterface; use Symfony\Component\HttpFoundation\Request; /** * Controller manager class */ class resolver implements ControllerResolverInterface { /** * ContainerInterface object * @var ContainerInterface */ protected $container; /** * phpbb\template\template object * @var \phpbb\template\template */ protected $template; /** * Request type cast helper object * @var \phpbb\request\type_cast_helper */ protected $type_cast_helper; /** * phpBB root path * @var string */ protected $phpbb_root_path; /** * Construct method * * @param ContainerInterface $container ContainerInterface object * @param string $phpbb_root_path Relative path to phpBB root * @param \phpbb\template\template $template */ public function __construct(ContainerInterface $container, $phpbb_root_path, \phpbb\template\template $template = null) { $this->container = $container; $this->template = $template; $this->type_cast_helper = new \phpbb\request\type_cast_helper(); $this->phpbb_root_path = $phpbb_root_path; } /** * Load a controller callable * * @param \Symfony\Component\HttpFoundation\Request $request Symfony Request object * @return bool|Callable Callable or false * @throws \phpbb\controller\exception */ public function getController(Request $request) { $controller = $request->attributes->get('_controller'); if (!$controller) { throw new \phpbb\controller\exception('CONTROLLER_NOT_SPECIFIED'); } // Require a method name along with the service name if (stripos($controller, ':') === false) { throw new \phpbb\controller\exception('CONTROLLER_METHOD_NOT_SPECIFIED'); } list($service, $method) = explode(':', $controller); if (!$this->container->has($service)) { throw new \phpbb\controller\exception('CONTROLLER_SERVICE_UNDEFINED', array($service)); } $controller_object = $this->container->get($service); /* * If this is an extension controller, we'll try to automatically set * the style paths for the extension (the ext author can change them * if necessary). */ $controller_dir = explode('\\', get_class($controller_object)); // 0 vendor, 1 extension name, ... if (!is_null($this->template) && isset($controller_dir[1])) { $controller_style_dir = 'ext/' . $controller_dir[0] . '/' . $controller_dir[1] . '/styles'; if (is_dir($this->phpbb_root_path . $controller_style_dir)) { $this->template->set_style(array($controller_style_dir, 'styles')); } } return array($controller_object, $method); } /** * Dependencies should be specified in the service definition and can be * then accessed in __construct(). Arguments are sent through the URL path * and should match the parameters of the method you are using as your * controller. * * @param \Symfony\Component\HttpFoundation\Request $request Symfony Request object * @param mixed $controller A callable (controller class, method) * @return array An array of arguments to pass to the controller * @throws \phpbb\controller\exception */ public function getArguments(Request $request, $controller) { // At this point, $controller should be a callable if (is_array($controller)) { list($object, $method) = $controller; $mirror = new \ReflectionMethod($object, $method); } else if (is_object($controller) && !$controller instanceof \Closure) { $mirror = new \ReflectionObject($controller); $mirror = $mirror->getMethod('__invoke'); } else { $mirror = new \ReflectionFunction($controller); } $arguments = array(); $parameters = $mirror->getParameters(); $attributes = $request->attributes->all(); foreach ($parameters as $param) { if (array_key_exists($param->name, $attributes)) { if (is_string($attributes[$param->name])) { $value = $attributes[$param->name]; $this->type_cast_helper->set_var($value, $attributes[$param->name], 'string', true, false); $arguments[] = $value; } else { $arguments[] = $attributes[$param->name]; } } else if ($param->getClass() && $param->getClass()->isInstance($request)) { $arguments[] = $request; } else if ($param->isDefaultValueAvailable()) { $arguments[] = $param->getDefaultValue(); } else { throw new \phpbb\controller\exception('CONTROLLER_ARGUMENT_VALUE_MISSING', array($param->getPosition() + 1, get_class($object) . ':' . $method, $param->name)); } } return $arguments; } } 5 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Software</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
<link rel="home" href="index.html" title="Instalado per DrakX-o">
<link rel="up" href="index.html" title="Instalado per DrakX-o">
<link rel="prev" href="diskPartitioning.html" title="Partitioning">
<link rel="next" href="addUser.html" title="User Management"><style xmlns="http://www.w3.org/TR/xhtml1/transitional" type="text/css">
<!--
body { font-family: sans-serif; font-size: 13px }
table { font-family: sans-serif; font-size: 13px }
--></style></head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<div lang="eo" class="section" title="Software">
<div class="titlepage">
<div>
<div>
<h2 class="title"><a name="software"></a>Software
</h2>
</div>
</div>
</div>
<div class="section" title="Media Selection">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a name="d5e703"></a>Media Selection
</h3>
</div>
</div>
</div>
<div lang="eo" class="section" title="Supplemental Installation Media">
<div class="titlepage">
<div>
<div>
<h4 class="title"><a name="add_supplemental_media"></a>Supplemental Installation Media
</h4>
</div>
</div>
</div>
<p>This screen shows you the list of already recognised repositories. You can
add other sources for packages, like an optical-disc or a remote source.
The source selection determines which packages will be available during the
subsequent steps.
</p>
<p>Por interreta datumportilo sekvighos per du pashoj:</p>
<div class="orderedlist">
<ol class="orderedlist" type="1">
<li class="listitem">
<p>Choosing and activating the network, if not already up.</p>
</li>
<li class="listitem">
<p>Selecting a mirror or specifying a URL (very first entry). By selecting a
mirror, you have access to the selection of all repositories managed by
Mageia, like the <span class="emphasis"><em>Nonfree</em></span>, the
<span class="emphasis"><em>Tainted</em></span> repositories and the
<span class="emphasis"><em>Updates</em></span>. With the URL, you can designate a specific
repository or your own NFS installation.
</p>
</li>
</ol>
</div>
<div class="note" title="Rimarko" style="margin-left: 0.5in; margin-right: 0.5in;">
<table border="0" summary="Note">
<tr>
<td rowspan="2" align="center" valign="top" width="25"><img alt="[Rimarko]" src="note.png"></td>
<th align="left"></th>
</tr>
<tr>
<td align="left" valign="top">
<p>If you are updating a 64-bit installation which may contain some 32-bit
packages, it is advised to use this screen to add an online mirror by
selecting one of the Network protocols here. The 64-bit DVD ISO only
contains 64-bit and <span class="emphasis"><em>noarch</em></span> packages, it will not be
able to update the 32-bit packages. However, after adding an online mirror,
the installer will find the needed 32-bit packages there.
</p>
</td>
</tr>
</table>
</div>
</div>
<div lang="eo" class="section" title="Nonfree Media">
<div class="titlepage">
<div>
<div>
<h4 class="title"><a name="media_selection"></a>Nonfree Media
</h4>
</div>
</div>
</div>
<p>Here you have the list of available repositories. Not all repositories are
available, according to which media you use for installing. The repositories
selection determines which packages will be available for selection during
the next steps.
</p>
<div class="itemizedlist">
<ul class="itemizedlist">
<li class="listitem">
<p>The <span class="emphasis"><em>Core</em></span> repository cannot be disabled as it contains
the base of the distribution.
</p>
</li>
<li class="listitem">
<p>The <span class="emphasis"><em>Nonfree</em></span> repository includes packages that are
free-of-charge, i.e. Mageia may redistribute them, but they contain
closed-source software (hence the name - Nonfree). For example this
repository includes nVidia and AMD graphics card proprietary drivers,
firmware for various WiFi cards, etc.
</p>
</li>
<li class="listitem">
<p>The <span class="emphasis"><em>Tainted</em></span> repository includes packages released under
a free license. The main criteria for placing packages in this repository is
that they may infringe patents and copyright laws in some countries,
e.g. multimedia codecs needed to play various audio/video files; packages
needed to play commercial video DVD's, etc.
</p>
</li>
</ul>
</div>
</div>
</div>
<div lang="eo" class="section" title="Grafika medio">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a name="chooseDesktop"></a>Grafika medio
</h3>
</div>
</div>
</div>
<p>Some choices made here will open other screens with related options.</p>
<p>After the selection step(s), you will see a slideshow during the
installation of required packages. The slideshow can be disabled by pressing
the <span class="emphasis"><em>Details</em></span> button.
</p>
<div class="itemizedlist">
<ul class="itemizedlist">
<li class="listitem">
<p>Choose whether you prefer to use the KDE Plasma or GNOME desktop
environment. Both come with a full set of useful applications and tools.
</p>
</li>
<li class="listitem">
<p>Select <span class="emphasis"><em>Custom</em></span> if you do not wish to use either (or,
actually use both) of these, or if you want to modify the default software
choices for these desktop environments. The LXDE desktop, for instance, is
lighter than the previous two, sporting less eye candy and having fewer
packages installed by default.
</p>
</li>
</ul>
</div>
</div>
<div lang="eo" class="section" title="Pakaĵaj grupoj">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a name="choosePackageGroups"></a>Pakaĵaj grupoj
</h3>
</div>
</div>
</div>
<p>Packages are arranged into common groups, to make choosing what you need on
your system a lot easier. The groups are fairly self explanatory, however
more information about the content of each is available in tool-tips which
become visible as the mouse is hovered over them.
</p>
<div class="itemizedlist">
<ul class="itemizedlist">
<li class="listitem">
<p><span class="bold"><strong>Workstation</strong></span></p>
</li>
<li class="listitem">
<p><span class="bold"><strong>Server</strong></span></p>
</li>
<li class="listitem">
<p><span class="bold"><strong>Graphical Environment</strong></span></p>
</li>
<li class="listitem">
<p><span class="bold"><strong>Individual Package Selection</strong></span>: you can use
this option to manually add or remove packages
</p>
</li>
</ul>
</div>
<p>See <a class="xref" href="software.html#minimal-install" title="Minimuma instalo">Minimal Install</a> for instructions on how to do a
minimal install (without or with X & IceWM).
</p>
</div>
<div lang="eo" class="section" title="Minimuma instalo">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a name="minimal-install"></a>Minimuma instalo
</h3>
</div>
</div>
</div>
<p>Minimal Installation is intended for those with specific uses in mind for
Mageia, such as a server or a specialised workstation. You will probably use
this option combined with the <span class="emphasis"><em>Individual package
selection</em></span> option to fine-tune your installation. See <a class="xref" href="software.html#choosePackagesTree" title="Elekto de individuaj pakaĵoj">Choose Packages Tree</a>.
</p>
<div class="itemizedlist">
<ul class="itemizedlist">
<li class="listitem">
<p>You can choose a <span class="emphasis"><em>Minimal Installation</em></span> by de-selecting
everything in the <span class="emphasis"><em>Package Group Selection</em></span> screen, see
<a class="xref" href="software.html#choosePackageGroups" title="Pakaĵaj grupoj">Choose Package Groups</a>.
</p>
<p>If desired, you can additionally tick the <span class="emphasis"><em>Individual package
selection</em></span> option in the same screen.
</p>
</li>
<li class="listitem">
<p>If you choose this installation method, then the relevant screen (see
screenshot below) will offer you a few useful extras to install, such as
documentation and <span class="quote">“<span class="quote">X</span>”</span>.
</p>
<p>If the <span class="emphasis"><em>With X</em></span> option is selected, then IceWM (a
lightweight desktop environment) will also be included.
</p>
</li>
</ul>
</div>
<p>The basic documentation is provided in the form of <span class="quote">“<span class="quote">man</span>”</span> and
<span class="quote">“<span class="quote">info</span>”</span> pages. It contains the man pages from the <a class="ulink" href="http://www.tldp.org/manpages/man.html" target="_top">Linux Documentation
Project</a> and the <a class="ulink" href="http://www.gnu.org/software/coreutils/manual/" target="_top">GNU
coreutils</a> info pages.
</p>
</div>
<div lang="eo" class="section" title="Elekto de individuaj pakaĵoj">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a name="choosePackagesTree"></a>Elekto de individuaj pakaĵoj
</h3>
</div>
</div>
</div>
<p>Here you can add or remove any extra packages to customize your
installation.
</p>
<p>After having made your choice, you can click on the
<span class="emphasis"><em>floppy</em></span> icon at the bottom of the page to save your
choice of packages (saving to a USB key works, too). You can then use this
file to install the same packages on another system, by pressing the same
button during install and choosing to load it.
</p>
</div>
</div>
</body>
</html>