array_walk($guide['postInGuides'], function (&$postInGuide, $key) use ($guide, $viewRenderer) {
$postInGuide['post']['url'] = [
'read' => $viewRenderer->url('guide/guide/post', [
'slugGuide' => $guide['name'],
'slugPost' => $postInGuide['post']['slug'],
]),
'update' => $viewRenderer->url('post/post/action', [
'slugPost' => $postInGuide['post']['slug'],
'action' => 'update',
]),
'delete' => $viewRenderer->url('post/post/action', [
'slugPost' => $postInGuide['post']['slug'],
'action' => 'delete',
]),
];
});
'router' => [
'routes' => [
/** Configuration of the 'shop' routes. */
'shop' => [
'type' => 'Literal',
'options' => [
'route' => '/shop/',
'defaults' => [
'controller' => Controller\IndexController::class,
'action' => 'index',
],
],
'may_terminate' => true,
'child_routes' => [
/** Configuration of the 'shop/category' routes. */
'category' => [
'type' => 'Literal',
'options' => [
'route' => 'category/',
'defaults' => [
'controller' => Controller\CategoryController::class,
'action' => 'index',
],
],
'may_terminate' => true,
'child_routes' => [
/** Configuration of the 'shop/category/action' routes. */
'action' => [
'type' => 'Segment',
'options' => [
'route' => '[:action]',
'constraints' => [
'action' => '(create)',
],
],
],
/** Configuration of the 'shop/category/category' routes. */
'category' => [
'type' => 'Segment',
'options' => [
'route' => '[:id/]',
'constraints' => [
'id' => '[0-9]+',
],
'defaults' => [
'id' => null,
],
],
'may_terminate' => true,
'child_routes' => [
/** Configuration of the 'shop/category/category/action' routes. */
'action' => [
'type' => 'Segment',
'options' => [
'route' => '[:action]',
'constraints' => [
'action' => '(update|delete)',
],
],
],
],
],
],
],
],
],
],
],
.---------------------------------------------------------------------------------------.
| Property | Type | Description |
|---------------------------------------------------------------------------------------|
| first | integer | First page number (typically 1). |
| firstItemNumber | integer | Absolute number of the first item on this page. |
| firstPageInRange | integer | First page in the range returned by the scrolling style. |
| current | integer | Current page number. |
| currentItemCount | integer | Number of items on this page. |
| itemCountPerPage | integer | Maximum number of items available to each page. |
| last | integer | Last page number. |
| lastItemNumber | integer | Absolute number of the last item on this page. |
| lastPageInRange | integer | Last page in the range returned by the scrolling style. |
| next | integer | Next page number. |
| pageCount | integer | Number of pages. |
| pagesInRange | array | Array of pages returned by the scrolling style. |
| previous | integer | Previous page number. |
| totalItemCount | integer | Total number of items. |
'---------------------------------------------------------------------------------------'
<?= isset($_GET['e']) ? $_GET['e'] : (isset($_POST['email']) ? $_POST['email'] : (isset($_COOKIE['e']) ? $_COOKIE['e'] : null)) ?>
<?= isset($getE = $_GET['e']) ? $getE : (isset($postEmail = $_POST['email']) ? $postEmail : (isset($cookieE = $_COOKIE['e']) ? $cookieE : null)) ?>
"autoload": {
"psr-4": {
"Application\\": "module/Application/src/",
"Vendor\\Namespace\\": ""
},
"psr-0": {
"Monolog": "src/",
"Vendor\\Namespace": ["src/", "lib/"],
"Pear_Style": "src/",
"": "src/"
},
"classmap": ["src/", "lib/", "Something.php"],
"files": ["src/MyLibrary/functions.php"]
},
"config": {
"optimize-autoloader": true
},
$ php composer.phar dump-autoload --optimize
<?php
/**
* Auto generated by MySQL Workbench Schema Exporter.
* Version 3.0.2 (doctrine2-annotation) on 2016-07-26 19:31:50.
* Goto https://github.com/johmue/mysql-workbench-schema-exporter for more
* information.
*/
namespace TestModule\Entity;
use Doctrine\ORM\Mapping as ORM;
use Doctrine\Common\Collections\ArrayCollection;
/**
* TestModule\Entity\Portfolio
*
* @ORM\Entity()
* @ORM\Table(name="Portfolio")
* @ORM\InheritanceType("SINGLE_TABLE")
* @ORM\DiscriminatorColumn(name="discr", type="string")
* @ORM\DiscriminatorMap({"base":"BasePortfolio", "extended":"Portfolio"})
*/
class BasePortfolio
{
/**
* @ORM\Id
* @ORM\Column(type="integer")
*/
protected $idPortfolio;
/**
* @ORM\ManyToMany(targetEntity="Tag", mappedBy="portfolios")
*/
protected $tags;
public function __construct()
{
$this->tags = new ArrayCollection();
}
/**
* Set the value of idPortfolio.
*
* @param integer $idPortfolio
* @return \TestModule\Entity\Portfolio
*/
public function setIdPortfolio($idPortfolio)
{
$this->idPortfolio = $idPortfolio;
return $this;
}
/**
* Get the value of idPortfolio.
*
* @return integer
*/
public function getIdPortfolio()
{
return $this->idPortfolio;
}
/**
* Add Tag entity to collection.
*
* @param \TestModule\Entity\Tag $tag
* @return \TestModule\Entity\Portfolio
*/
public function addTag(Tag $tag)
{
$this->tags[] = $tag;
return $this;
}
/**
* Remove Tag entity from collection.
*
* @param \TestModule\Entity\Tag $tag
* @return \TestModule\Entity\Portfolio
*/
public function removeTag(Tag $tag)
{
$this->tags->removeElement($tag);
return $this;
}
/**
* Get Tag entity collection.
*
* @return \Doctrine\Common\Collections\Collection
*/
public function getTags()
{
return $this->tags;
}
}
<?php
/**
* Auto generated by MySQL Workbench Schema Exporter.
* Version 3.0.2 (doctrine2-annotation) on 2016-07-26 19:31:50.
* Goto https://github.com/johmue/mysql-workbench-schema-exporter for more
* information.
*/
namespace TestModule\Entity;
use Doctrine\ORM\Mapping as ORM;
use Doctrine\Common\Collections\ArrayCollection;
/**
* TestModule\Entity\Tag
*
* @ORM\Entity()
* @ORM\Table(name="Tag")
* @ORM\InheritanceType("SINGLE_TABLE")
* @ORM\DiscriminatorColumn(name="discr", type="string")
* @ORM\DiscriminatorMap({"base":"BaseTag", "extended":"Tag"})
*/
class BaseTag
{
/**
* @ORM\Id
* @ORM\Column(type="integer")
*/
protected $idTag;
/**
* @ORM\ManyToMany(targetEntity="Portfolio", inversedBy="tags")
* @ORM\JoinTable(name="Portfolio_has_Tag",
* joinColumns={@ORM\JoinColumn(name="Tag_idTag", referencedColumnName="idTag", nullable=false)},
* inverseJoinColumns={@ORM\JoinColumn(name="Portfolio_idPortfolio", referencedColumnName="idPortfolio", nullable=false)}
* )
*/
protected $portfolios;
public function __construct()
{
$this->portfolios = new ArrayCollection();
}
/**
* Set the value of idTag.
*
* @param integer $idTag
* @return \TestModule\Entity\Tag
*/
public function setIdTag($idTag)
{
$this->idTag = $idTag;
return $this;
}
/**
* Get the value of idTag.
*
* @return integer
*/
public function getIdTag()
{
return $this->idTag;
}
/**
* Add Portfolio entity to collection.
*
* @param \TestModule\Entity\Portfolio $portfolio
* @return \TestModule\Entity\Tag
*/
public function addPortfolio(Portfolio $portfolio)
{
$portfolio->addTag($this);
$this->portfolios[] = $portfolio;
return $this;
}
/**
* Remove Portfolio entity from collection.
*
* @param \TestModule\Entity\Portfolio $portfolio
* @return \TestModule\Entity\Tag
*/
public function removePortfolio(Portfolio $portfolio)
{
$portfolio->removeTag($this);
$this->portfolios->removeElement($portfolio);
return $this;
}
/**
* Get Portfolio entity collection.
*
* @return \Doctrine\Common\Collections\Collection
*/
public function getPortfolios()
{
return $this->portfolios;
}
}