PHP code example of ckrack / optimus-bundle

1. Go to this page and download the library: Download ckrack/optimus-bundle library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

ckrack / optimus-bundle example snippets




return [
    …,
    Ckrack\OptimusBundle\CkrackOptimusBundle::class => ['all' => true],
];

$optimus = $this->get('optimus');

/**
 * @Route("/users/{optimus}")
 */
public function getAction(int $optimus)
{
}

/**
 * @Route("/users/{user}")
 * @ParamConverter("user", options={"optimus" = "user"})
 */
public function getAction(int $user)
{
}

/**
 * @Route("/users/{user}")
 * @ParamConverter("user")
 */
public function getAction(User $user)
{
}