PHP code example of district-web / pomm-bundle

1. Go to this page and download the library: Download district-web/pomm-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/ */

    

district-web / pomm-bundle example snippets


 // app/AppKernel.php
// …
    public function registerBundles()
    {
        $bundles = [
        // other bundles
        new \PommProject\PommBundle\PommBundle(),
        // other bundles
        ];

    function myAction($name)
    {
        $students = $this->get('pomm')['my_db2']
            ->getModel('\AppBundle\Model\MyDb1\PublicSchema\StudentModel')
            ->findWhere('name = $*', [$name])
            ;

        …


/**
 * @ParamConverter("student", options={"session": "my_db2"})
 */
public function getAction(Student $student)


/**
 * @ParamConverter("student", options={"model": "StudentModel"})
 */
public function getAction(Student $student)