Phreak!

ultra-fast lite php framework for lamez


Introduction


Another PHP framework? Yes!
The main difference from the other php frameworks out there is that Phreak is really simple for starters and you need less time to learn it. To stay close to the trends, the syntax is very similar to Laravel and other php frameworks.
The main reason for the creation of the Phreak! php framework is less dependencies. Maybe you've noticed that most of the frameworks have a lot of dependencies on other packages. But what happens when these packages are abandoned? You're screwed! Right!
Phreak! depends mostly on the following packages:

  1. Phroute (url routing)
  2. PHP-DI (dependency injection container)
  3. Smarty (template engine)
  4. Stash (caching library)
  5. Zend Diactoros (request/response handlers)
  6. RelayPHP (middleware dispatcher)
  7. PSR7-Middlewares (collection of PSR-7 middlewares)

This documentation is to help you regarding each step of customization. Please go through the documentation carefully to understand how Phreak works.

Getting Started #back to top

Requirements

You will need the following sofwares to run phreak!.

  1. PHP >= 5.6.4
  2. PDO PHP Extension
  3. Apache/NGINX webserver

You can actualy run phreak! from the console without a web server

Installing Phreak! #back to top

Phreak utilizes Composer to manage its dependencies. So, before using it, make sure you have Composer installed on your machine.

                            composer create-project webdevlabs/phreak
                        

Upload via FTP

You can ofcourse manualy upload all phreak's files and dependencies through FTP. After uploading all the files you need to execute the Phreak installer manualy

                            php installer
                        

Configuration #back to top

The config/ directory

All Phreak!'s configuration files are located in the config directory. All configuration files (except "base.php") are in the format of a simple php array

                        return [
                            'mysql'=>[
                                'host'=>'localhost',
                                'dbname'=>'phreak',
                                'username'=>'root',
                                'password'=>'',
                                'charset'=>'utf8'
                            ]
                        ];
                        

Routing #back to top

Full routing documentation can be found here.

Defining routes - #back to top

                            $router->get($route, $handler);    // match only get requests
                            $router->post($route, $handler);   // match only post requests
                            $router->delete($route, $handler); // match only delete requests
                            $router->any($route, $handler);    // match any request method                            
                            

This method accepts the HTTP method the route must match, the route pattern and a callable handler, which can be a closure, function name or ['ClassName', 'method'] pair.

The methods also accept an additional parameter which is an array of middlewares: currently filters before and after, and route prefixing with prefix are supported. See the sections on Filters and Prefixes for more info and examples.

By default a route pattern syntax is used where {foo} specifies a placeholder with name foo and matching the string [^/]+. To adjust the pattern the placeholder matches, you can specify a custom pattern by writing {bar:[0-9]+}. However, it is also possible to adjust the pattern syntax by passing a custom route parser to the router at construction.

                            // Lazy load autoloaded route handling classes using strings for classnames
                            // Calls the Controllers\User::displayUser($id) method with {id} parameter as an argument
                            $router->any('/users/{id}', ['Controllers\User','displayUser']);
                        

Filters - #back to top

                            $router->filter('statsStart', function(){    
                                setPageStartTime(microtime(true));
                            });

                            $router->filter('statsComplete', function(){    
                                var_dump('Page load time: ' . (microtime(true) - getPageStartTime()));
                            });

                            $router->get('/user/{name}', function($name){
                                return 'Hello ' . $name;
                            }, ['before' => 'statsStart', 'after' => 'statsComplete']);                                
                        

Controllers #back to top

                            namespace MyApp;

                            class Test {
                                
                                public function anyIndex()
                                {
                                    return 'This is the default page and will respond to /controller and /controller/index';
                                }
                                
                                /**
                                * One required paramter and one optional parameter
                                */
                                public function anyTest($param, $param2 = 'default')
                                {
                                    return 'This will respond to /controller/test/{param}/{param2}? with any method';
                                }
                                
                                public function getTest()
                                {
                                    return 'This will respond to /controller/test with only a GET method';
                                }
                                
                                public function postTest()
                                {
                                    return 'This will respond to /controller/test with only a POST method';
                                }
                                
                                public function putTest()
                                {
                                    return 'This will respond to /controller/test with only a PUT method';
                                }
                                
                                public function deleteTest()
                                {
                                    return 'This will respond to /controller/test with only a DELETE method';
                                }
                            }

                            $router->controller('/controller', 'MyApp\\Test');

                            // Controller with associated filter
                            $router->controller('/controller', 'MyApp\\Test', ['before' => 'auth']);    
                            

Middleware #back to top

you can put middleware inside the bootstrap.php in the main directory.

Views #back to top

Smarty - #back to top

The views are handled by the Smarty template engine which is perfectly separating the design from the programming.


Style Options - #back to top

Lorem the It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using 'Content here, content here', making it look like readable English. long established fact that a reader will English.


Header Options - #back to top

Lorem the It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using 'Content here, content here', making it look like readable English. long established fact that a reader will English.


Font Options - #back to top

Lorem the It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using 'Content here, content here', making it look like readable English. long established fact that a reader will English.


Slider Options - #back to top

Lorem the It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using 'Content here, content here', making it look like readable English. long established fact that a reader will English.


Page Options - #back to top

Lorem the It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using 'Content here, content here', making it look like readable English. long established fact that a reader will English.


Import & Export Options - #back to top

Lorem the It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using 'Content here, content here', making it look like readable English. long established fact that a reader will English.

Support Desk #back to top

Please remember you have purchased a very affordable theme and you have not paid for a full-time web design agency. Occasionally we will help with small tweaks, but these requests will be put on a lower priority due to their nature. Support is also 100% optional and we provide it for your connivence, so please be patient, polite and respectful.

Please visit our profile page or ask question @yourusername

Support for my items includes:
  • * Responding to questions or problems regarding the item and its features
  • * Fixing bugs and reported issues
  • * Providing updates to ensure compatibility with new software versions
Item support does not include:
  • * Customization and installation services
  • * Support for third party software and plug-ins
Before seeking support, please...
  • * Make sure your question is a valid Theme Issue and not a customization request.
  • * Make sure you have read through the documentation and any related video guides before asking support on how to accomplish a task.
  • * Make sure to double check the theme FAQs.
  • * Try disabling any active plugins to make sure there isn't a conflict with a plugin. And if there is this way you can let us know.
  • * If you have customized your theme and now have an issue, back-track to make sure you didn't make a mistake. If you have made changes and can't find the issue, please provide us with your changelog.
  • * Almost 80% of the time we find that the solution to people's issues can be solved with a simple "Google Search". You might want to try that before seeking support. You might be able to fix the issue yourself much quicker than we can respond to your request.
  • * Make sure to state the name of the theme you are having issues with when requesting support via ThemeForest.

Files & Sources #back to top

Included Stylesheets

These are the primary CSS files used for general front-end styling. Use these to customize your theme even further. All included JavaScript codes under yourthemename/css/

  • 1. style.css - Primary stylesheet
  • 2. bootstrap.css - Bootstrap stylesheet
  • 3. owl-carousel.css - OWL Carousel
  • 4. fontawesome.css - FontAwesome Font Icons stylesheet
  • 5. custom.css - Pathos Color Schemes stylesheet
  • 6. prettyPhoto.css - Lightbox effect css file
  • 7. flexslider.css - Flexslider css file
  • 8. et-line.css - Elegant icons css file
  • 9. carousel.css - OWL Carousel css file
  • 10. animate.css - CSS3 animations css file
Included JavaScript

These are the various attribution inks to the Javascript files included or modified to work with in this theme. All included JavaScript codes under yourthemename/js/

  • 1. bootstrap.js - Bootstrap JavaScript
  • 2. custom.js - All JavaScript Plugins
  • 3. retina.js - Retina JavaScript
  • 4. jquery.js - Base JavaScript
  • 5. prettyPhoto.js - Lightbox JavaScript
  • 6. owl-carousel.js - Lightbox JavaScript
  • 7. revslider.js - Revolution Slider JavaScript
  • 8. flexslider.js - Flexslider JavaScript
  • 9. awesome-grid.nin.js - Awesome grid portfolio JavaScript
  • 10. circle.js - Coming soon page JavaScript
  • 11. contact.js - Contact form validate JavaScript
  • 12. isotope.js - Masonry Portfolio JavaScript
  • 13. progress.js - Progress bar JavaScript
  • 14. rotate.js - Text rotate effect JavaScript
  • 15. wow.js - CSS3 animation JavaScript

Version History (Changelog) #back to top

You can find the version history (changelog.txt) file on yourthemename-full.zip folder or you can check changelog on theme sale page.

Once again, thank you so much for purchasing this theme. As I said at the beginning, I'd be glad to help you if you have any questions relating to this theme. No guarantees, but I'll do my best to assist. If you have a more general question relating to the themes on ThemeForest, you might consider visiting the forums and asking your question in the "Item Discussion" section.


Changelog


                                        -----------------------------------------------------------------------------------------
                                        Version 3.8.4 - May 7th, 2015
                                        -----------------------------------------------------------------------------------------

                                        - new revolution slider plugin version
                                        - fixed security issue with xss vulnerability
                                        - improved demo importer for certain server environments
                                        - updated WooCommerce template files for the outdated message in system status
                                        - added suhosin check in system status 
                                        - added information that explains ZipArchive is required on your server for importing demos 
                                        - portfolio Grid template improvement
                                        - added more information to demo popup message for individual demo requirements
                                        - RTL style improvements
                                        - breadcrumb function improved for various areas

                                        -----------------------------------------------------------------------------------------
                                        Version 3.8.3 - May 7th, 2015
                                        -----------------------------------------------------------------------------------------
                                        - fixed responsive / retina issue for larger logos
                                        - fusion slider now uses responsive headings all the time
                                        - dropped custom Avada styles for select boxes in IE since it is not supported
                                        - fixed compatibility issue with Category Order and Taxonomy Terms Order plugin
                                        - fixed issue of full width background being affected by padding options
                                        - tested and fixed hellobar issue 
                                        - typography settings now apply to single post pages
                                        - improved smooth scroll in certain situations
                                        - youtube & vimeo videos will show at normal size in light box as long as video embed link is not used
                                        - fixed issue of “fixed” featured image mode not working for carousels / recent work
                                        - fixed issue of header tagline font not working with font options

                                        -----------------------------------------------------------------------------------------
                                        Version 3.8.2 - May 7th, 2015
                                        -----------------------------------------------------------------------------------------
                                        - fixed formatting issues with Turkish language files 
                                        - letter spacing menu option improvement
                                        - improved fusion slider max content width setting
                                        - removed the “disable first featured image on products” setting since it does not apply
                                        - improved portfolio featured image loading
                                        - removed encoding from tracking code, space before head, space before body, and custom CSS to stop it from parsing code within TO and removing special characters e.g. +
                                        - woo login box now shows login fields for logged out users
                                        - woo cart / my account links now show on mobile 
                                        - fixed button styling issue with gravity forms