PHP Classes

Silex Enhanced: Silex with custom services providers.

Recommend this page to a friend!
     
  Info   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not yet rated by the usersTotal: 79 All time: 10,122 This week: 673Up
Version License PHP version Categories
silex-enhanced 0.9MIT/X Consortium ...5.4PHP 5, Libraries
Description 

Author

This package provides a skeleton for Silex framework based application.

It can read YAML configuration files and load custom service providers in a Silex deployment based on the configuration definitions.

It can be used for either Web or console applications.

Picture of Rafael Espinosa
  Performance   Level  
Name: Rafael Espinosa <contact>
Classes: 6 packages by
Country: Cuba Cuba
Age: 36
All time rank: 19864 in Cuba Cuba
Week rank: 170 Up1 in Cuba Cuba Up
Innovation award
Innovation award
Nominee: 1x

Details

Silex Enhanced

A simple web framework for bootstrap web and console applications. For further details check Silex documentation.

On Silex Enhanced almost everything works based on config. The config files are located under app/Resources/config. Like Symfony2 supports import resources and parameters replacement.

Installing

Prerequisites

  • PHP version >5.4
  • Apache2 web server or similar
  • Composer
  • Bower ### Deploying
  1. Clone Silex Enhanced project with git.
  2. Run `composer update` and `bower update`.
  3. Run `php bin/console assets:install` command from console.
  4. Configure your web server, create a virtual host with `path/to/project/web` as document root.
  5. Set web server write permissions.
    Ubuntu example:
    sudo chmod -R 775 path/to/project/var && sudo chown -R www-data:www-data path/to/project/var
    
  6. Access your project url with web browser.

Configuration

config.yml

All common configs shared by both, console and web applications. Put your service providers under service_providers section.

 service_providers:
    monolog:
        class: Silex\Provider\MonologServiceProvider
        construct_parameters: ~
        parameters:
            monolog.logfile: %log_path%/common.log
            monolog.name: COMMON
 ...

console.yml \& application.yml

The console and web bootstrap config respectively. If you use imports statement the config will be merged recursively allows partial specific configs.

parameters.yml

Values for config parameters substitution. On application code parameters are accessible through Fluency\Silex\Application instance $app->getParameter('parameterName') or $app['config']['parameters'].

routing.yml

Holds controller service names and routes for binding.

 routing:
     controllers:
         My.Controller.Service.Name: My\Controller\Class\Name
    routes:
        - { name: my_route_name, pattern: route_pattern, controller: My.Controller.Service.Name:MyAction, method: get }

security.yml

The security firewalls and access control config. All information about it's available here.

Acme demo

Simple Bootstrap 3 based demo using Xeon template from Shape Bootstrap.


  Files folder image Files (127)  
File Role Description
Files folder imageapp (1 file, 1 directory)
Files folder imagebin (1 file)
Files folder imagesrc (2 directories)
Files folder imagevar (2 directories)
Files folder imageweb (4 files, 1 directory)
Accessible without login Plain text file .bowerrc Data Bower config
Accessible without login Plain text file .gitignore Data Auxiliary data
Accessible without login Plain text file bower.json Data Bower dependencies
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file LICENSE Lic. Auxiliary data
Accessible without login Plain text file README.md Doc. Auxiliary data

  Files folder image Files (127)  /  app  
File Role Description
Files folder imageResources (4 directories)
  Accessible without login Plain text file bootstrap.php Example Application script

  Files folder image Files (127)  /  app  /  Resources  
File Role Description
Files folder imageconfig (7 files)
Files folder imagedb (1 file)
Files folder imagei18n (2 files)
Files folder imageviews (1 file)

  Files folder image Files (127)  /  app  /  Resources  /  config  
File Role Description
  Accessible without login Plain text file application.yml Data Auxiliary data
  Accessible without login Plain text file config.yml Data Auxiliary data
  Accessible without login Plain text file console.yml Data Config for concole application
  Accessible without login Plain text file parameters.yml Data Parameters config file
  Accessible without login Plain text file routing.yml Data Auxiliary data
  Accessible without login Plain text file security.yml Data Auxiliary data
  Accessible without login Plain text file services.yml Data Services config

  Files folder image Files (127)  /  app  /  Resources  /  db  
File Role Description
  Accessible without login Plain text file .gitkeep Data Auxiliary data

  Files folder image Files (127)  /  app  /  Resources  /  i18n  
File Role Description
  Accessible without login Plain text file en.yml Data Auxiliary data
  Accessible without login Plain text file es.yml Data Auxiliary data

  Files folder image Files (127)  /  app  /  Resources  /  views  
File Role Description
  Accessible without login Plain text file bootstrap.base.twig Data Auxiliary data

  Files folder image Files (127)  /  bin  
File Role Description
  Accessible without login Plain text file console Example Auxiliary data

  Files folder image Files (127)  /  src  
File Role Description
Files folder imageAcme (3 directories)
Files folder imageSilex (1 file, 6 directories)

  Files folder image Files (127)  /  src  /  Acme  
File Role Description
Files folder imageCommand (1 file)
Files folder imageController (2 files)
Files folder imageResources (2 directories)

  Files folder image Files (127)  /  src  /  Acme  /  Command  
File Role Description
  Plain text file HelloCommand.php Class Command for demo purposes

  Files folder image Files (127)  /  src  /  Acme  /  Controller  
File Role Description
  Accessible without login Plain text file AdminController.php Example Example script
  Accessible without login Plain text file XeonController.php Example Example script

  Files folder image Files (127)  /  src  /  Acme  /  Resources  
File Role Description
Files folder imagepublic (3 directories)
Files folder imageviews (1 directory)

  Files folder image Files (127)  /  src  /  Acme  /  Resources  /  public  
File Role Description
Files folder imagecss (2 files)
Files folder imageimages (6 files, 3 directories)
Files folder imagejs (3 files)

  Files folder image Files (127)  /  src  /  Acme  /  Resources  /  public  /  css  
File Role Description
  Accessible without login Plain text file main.css Data Auxiliary data
  Accessible without login Plain text file prettyPhoto.css Data Auxiliary data

  Files folder image Files (127)  /  src  /  Acme  /  Resources  /  public  /  images  
File Role Description
Files folder imageico (5 files)
Files folder imageportfolio (2 directories)
Files folder imageprettyPhoto (6 directories)
  Accessible without login Image file logo.png Icon Icon image
  Accessible without login Image file shapebootstrap.png Icon Icon image
  Accessible without login Image file slider-bg.jpg Data Auxiliary data
  Accessible without login Image file team1.jpg Icon Icon image
  Accessible without login Image file team2.jpg Icon Icon image
  Accessible without login Image file team3.jpg Icon Icon image

  Files folder image Files (127)  /  src  /  Acme  /  Resources  /  public  /  images  /  ico  
File Role Description
  Accessible without login Image file apple-touch-icon-114-precomposed.png Icon Icon image
  Accessible without login Image file apple-touch-icon-144-precomposed.png Icon Icon image
  Accessible without login Image file apple-touch-icon-57-precomposed.png Icon Icon image
  Accessible without login Image file apple-touch-icon-72-precomposed.png Icon Icon image
  Accessible without login Image file favicon.ico Data Auxiliary data

  Files folder image Files (127)  /  src  /  Acme  /  Resources  /  public  /  images  /  portfolio  
File Role Description
Files folder imagefull (7 files)
Files folder imagethumb (7 files)

  Files folder image Files (127)  /  src  /  Acme  /  Resources  /  public  /  images  /  portfolio  /  full  
File Role Description
  Accessible without login Image file item1.jpg Data Auxiliary data
  Accessible without login Image file item2.jpg Icon Icon image
  Accessible without login Image file item3.jpg Icon Icon image
  Accessible without login Image file item4.jpg Data Auxiliary data
  Accessible without login Image file item5.jpg Icon Icon image
  Accessible without login Image file item6.jpg Data Auxiliary data
  Accessible without login Image file item7.jpg Data Auxiliary data

  Files folder image Files (127)  /  src  /  Acme  /  Resources  /  public  /  images  /  portfolio  /  thumb  
File Role Description
  Accessible without login Image file item1.jpg Icon Icon image
  Accessible without login Image file item2.jpg Icon Icon image
  Accessible without login Image file item3.jpg Icon Icon image
  Accessible without login Image file item4.jpg Icon Icon image
  Accessible without login Image file item5.jpg Icon Icon image
  Accessible without login Image file item6.jpg Icon Icon image
  Accessible without login Image file item7.jpg Icon Icon image

  Files folder image Files (127)  /  src  /  Acme  /  Resources  /  public  /  images  /  prettyPhoto  
File Role Description
Files folder imagedark_rounded (6 files)
Files folder imagedark_square (6 files)
Files folder imagedefault (7 files)
Files folder imagefacebook (9 files)
Files folder imagelight_rounded (5 files)
Files folder imagelight_square (5 files)

  Files folder image Files (127)  /  src  /  Acme  /  Resources  /  public  /  images  /  prettyPhoto  /  dark_rounded  
File Role Description
  Accessible without login Image file btnNext.png Icon Icon image
  Accessible without login Image file btnPrevious.png Icon Icon image
  Accessible without login Image file contentPattern.png Icon Icon image
  Accessible without login Image file default_thumbnail.gif Icon Icon image
  Accessible without login Image file loader.gif Icon Icon image
  Accessible without login Image file sprite.png Icon Icon image

  Files folder image Files (127)  /  src  /  Acme  /  Resources  /  public  /  images  /  prettyPhoto  /  dark_square  
File Role Description
  Accessible without login Image file btnNext.png Icon Icon image
  Accessible without login Image file btnPrevious.png Icon Icon image
  Accessible without login Image file contentPattern.png Icon Icon image
  Accessible without login Image file default_thumbnail.gif Icon Icon image
  Accessible without login Image file loader.gif Icon Icon image
  Accessible without login Image file sprite.png Icon Icon image

  Files folder image Files (127)  /  src  /  Acme  /  Resources  /  public  /  images  /  prettyPhoto  /  default  
File Role Description
  Accessible without login Image file default_thumb.png Icon Icon image
  Accessible without login Image file loader.gif Icon Icon image
  Accessible without login Image file sprite.png Icon Icon image
  Accessible without login Image file sprite_next.png Icon Icon image
  Accessible without login Image file sprite_prev.png Icon Icon image
  Accessible without login Image file sprite_x.png Icon Icon image
  Accessible without login Image file sprite_y.png Icon Icon image

  Files folder image Files (127)  /  src  /  Acme  /  Resources  /  public  /  images  /  prettyPhoto  /  facebook  
File Role Description
  Accessible without login Image file btnNext.png Icon Icon image
  Accessible without login Image file btnPrevious.png Icon Icon image
  Accessible without login Image file contentPatternBottom.png Icon Icon image
  Accessible without login Image file contentPatternLeft.png Icon Icon image
  Accessible without login Image file contentPatternRight.png Icon Icon image
  Accessible without login Image file contentPatternTop.png Icon Icon image
  Accessible without login Image file default_thumbnail.gif Icon Icon image
  Accessible without login Image file loader.gif Icon Icon image
  Accessible without login Image file sprite.png Icon Icon image

  Files folder image Files (127)  /  src  /  Acme  /  Resources  /  public  /  images  /  prettyPhoto  /  light_rounded  
File Role Description
  Accessible without login Image file btnNext.png Icon Icon image
  Accessible without login Image file btnPrevious.png Icon Icon image
  Accessible without login Image file default_thumbnail.gif Icon Icon image
  Accessible without login Image file loader.gif Icon Icon image
  Accessible without login Image file sprite.png Icon Icon image

  Files folder image Files (127)  /  src  /  Acme  /  Resources  /  public  /  images  /  prettyPhoto  /  light_square  
File Role Description
  Accessible without login Image file btnNext.png Icon Icon image
  Accessible without login Image file btnPrevious.png Icon Icon image
  Accessible without login Image file default_thumbnail.gif Icon Icon image
  Accessible without login Image file loader.gif Icon Icon image
  Accessible without login Image file sprite.png Icon Icon image

  Files folder image Files (127)  /  src  /  Acme  /  Resources  /  public  /  js  
File Role Description
  Accessible without login Plain text file jquery.isotope.min.js Data Auxiliary data
  Accessible without login Plain text file jquery.prettyPhoto.js Data Auxiliary data
  Accessible without login Plain text file main.js Data Auxiliary data

  Files folder image Files (127)  /  src  /  Acme  /  Resources  /  views  
File Role Description
Files folder imageacme (2 directories)

  Files folder image Files (127)  /  src  /  Acme  /  Resources  /  views  /  acme  
File Role Description
Files folder imageadmin (1 file)
Files folder imagexeon (4 files, 1 directory)

  Files folder image Files (127)  /  src  /  Acme  /  Resources  /  views  /  acme  /  admin  
File Role Description
  Accessible without login Plain text file login.html.twig Data Auxiliary data

  Files folder image Files (127)  /  src  /  Acme  /  Resources  /  views  /  acme  /  xeon  
File Role Description
Files folder imagesections (6 files)
  Accessible without login Plain text file footer.inc.twig Data Auxiliary data
  Accessible without login Plain text file header.inc.twig Data Auxiliary data
  Accessible without login Plain text file home.html.twig Data Auxiliary data
  Accessible without login Plain text file xeon.base.twig Data Auxiliary data

  Files folder image Files (127)  /  src  /  Acme  /  Resources  /  views  /  acme  /  xeon  /  sections  
File Role Description
  Accessible without login Plain text file about-us.inc.twig Data Auxiliary data
  Accessible without login Plain text file contact.inc.twig Data Auxiliary data
  Accessible without login Plain text file main-slider.inc.twig Data Auxiliary data
  Accessible without login Plain text file portfolio.inc.twig Data Auxiliary data
  Accessible without login Plain text file pricing.inc.twig Data Auxiliary data
  Accessible without login Plain text file services.inc.twig Data Auxiliary data

  Files folder image Files (127)  /  src  /  Silex  
File Role Description
Files folder imageComposer (1 file)
Files folder imageConsole (3 files, 1 directory)
Files folder imageDoctrine (1 directory)
Files folder imageFramework (1 directory)
Files folder imageProvider (4 files)
Files folder imageSecurity (1 directory)
  Accessible without login Plain text file Application.php Appl. Application script

  Files folder image Files (127)  /  src  /  Silex  /  Composer  
File Role Description
  Plain text file ScriptHandler.php Class Auxiliary script

  Files folder image Files (127)  /  src  /  Silex  /  Console  
File Role Description
Files folder imageEventListener (1 file)
  Plain text file Application.php Class Class source
  Plain text file Command.php Class Class source
  Plain text file Events.php Class Class source

  Files folder image Files (127)  /  src  /  Silex  /  Console  /  EventListener  
File Role Description
  Plain text file LoggerListener.php Class Class source

  Files folder image Files (127)  /  src  /  Silex  /  Doctrine  
File Role Description
Files folder imageDBAL (2 directories)

  Files folder image Files (127)  /  src  /  Silex  /  Doctrine  /  DBAL  
File Role Description
Files folder imageSchema (1 file)
Files folder imageTools (1 directory)

  Files folder image Files (127)  /  src  /  Silex  /  Doctrine  /  DBAL  /  Schema  
File Role Description
  Plain text file ConfigurableSchema.php Class Class source

  Files folder image Files (127)  /  src  /  Silex  /  Doctrine  /  DBAL  /  Tools  
File Role Description
Files folder imageConsole (1 directory)

  Files folder image Files (127)  /  src  /  Silex  /  Doctrine  /  DBAL  /  Tools  /  Console  
File Role Description
Files folder imageCommand (4 files)

  Files folder image Files (127)  /  src  /  Silex  /  Doctrine  /  DBAL  /  Tools  /  Console  /  Command  
File Role Description
  Plain text file AbstractDBALCommand.php Class Class source
  Plain text file CreateDatabaseCommand.php Class Class source
  Accessible without login Plain text file CreateSchemaCommand.php Appl. Application script
  Plain text file DropDatabaseCommand.php Class Class source

  Files folder image Files (127)  /  src  /  Silex  /  Framework  
File Role Description
Files folder imageCommand (1 file)

  Files folder image Files (127)  /  src  /  Silex  /  Framework  /  Command  
File Role Description
  Plain text file AssetsInstallCommand.php Class Class source

  Files folder image Files (127)  /  src  /  Silex  /  Provider  
File Role Description
  Plain text file ConsoleServiceProvider.php Class Class source
  Plain text file EventDispatcherServiceProvider.php Class Class source
  Plain text file FileSystemServiceProvider.php Class Class source
  Plain text file YamlConfigServiceProvider.php Class Class source

  Files folder image Files (127)  /  src  /  Silex  /  Security  
File Role Description
Files folder imageCore (1 directory)

  Files folder image Files (127)  /  src  /  Silex  /  Security  /  Core  
File Role Description
Files folder imageDbal (3 files)

  Files folder image Files (127)  /  src  /  Silex  /  Security  /  Core  /  Dbal  
File Role Description
  Plain text file RoleTable.php Class Class source
  Plain text file SecuritySchema.php Class Class source
  Plain text file UserTable.php Class Class source

  Files folder image Files (127)  /  var  
File Role Description
Files folder imagecache (1 file)
Files folder imagelogs (1 file)

  Files folder image Files (127)  /  var  /  cache  
File Role Description
  Accessible without login Plain text file .gitkeep Data Auxiliary data

  Files folder image Files (127)  /  var  /  logs  
File Role Description
  Accessible without login Plain text file .gitkeep Data Auxiliary data

  Files folder image Files (127)  /  web  
File Role Description
Files folder imageassets (1 file)
  Accessible without login Plain text file .htaccess Data Auxiliary data
  Accessible without login Plain text file app.php Appl. Application script
  Accessible without login Plain text file app_dev.php Appl. Application script
  Accessible without login Plain text file index.php Appl. Application script

  Files folder image Files (127)  /  web  /  assets  
File Role Description
  Accessible without login Plain text file .gitkeep Data Auxiliary data

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 81%
Total:79
This week:0
All time:10,122
This week:673Up