Skip to main content

Create custom params file in yii framework



Yii framework is come with powerful inbuild features eg. 
1. Model-View-Controller (MVC) design pattern 
2. Database Access Objects (DAO) 
3. Custom Query Builder, Active Record (AR) and DB Migration
4. Form input and validation 
5. AJAX-enabled widgets 
6. Authentication and authorization 
7. Layout Skinning and theming 
8. Web services 
9. Internationalization (I18N) and localization (L10N) 
10. Layered caching scheme 
11. Error handling and logging 
12. Security 
13. Unit and functionality testing 
14. Automatic code generation (Gii Module) 
15. Friendly with third-party code
16. Detailed documentation 
17. Extension library etc.

Most of yii beginner write parameter in main.php because thats pattern comes in installed yii framework. This is fine if you have less parameter but if you are building large web portal or application then it's very hard to manage every thing in mail.php because its main config file. So the best way is create seperate params.php in the same directory and include it in you main.php file. Check is below example of params.php and main.php files.
config/main.php :
'params'=>require(dirname(__FILE__).'/params.php'),
config/params.php :
<?php
return array(
 'defaultPageSize'=>10,
 'websiteName'=>'ezeelive.com',
 'copyrightInfo'=>'Copyright &copy; '.date("Y").' Ezeelive Technologies. All Rights Reserved.',
 ...
 ...
);
?>

Comments

  1. As a web development and design service provider Webzin Infotech provides optimum solutions to customer by helping them to achive there goals and make available there services and products in the online market.

    ReplyDelete
  2. Every web design companies and development firms should give the proper responsive to their clients have capability to fulfill the requirement of customers.Then only they would get a chance to improve their business.
    Web Design Company | Website Design Companies

    ReplyDelete
  3. Thanks for sharing such a wonderful post.We also provides the best Web Design & Development services in India.

    ReplyDelete

Post a Comment

Popular posts from this blog

Why Ezeelive Technologies is No. 1 PHP Development Company in India

The virtual world knows absolutely no boundaries when it comes to evolution and growth. If you have a business and are planning for expansion, social media advertising is the best option available to reach the mass. For this, the most common and effective medium is a website. The moment you think of a website, the first thought that hits your mind is the requirement of a PHP Development Company . Now the issue is sensitive and needs your keenest attention as the market image and popularity of your firm is involved. There is no need to worry as E zeelive Technologies   is here to solve your problem with its expertise in PHP development. To explore more about the matter, read ahead. Why choose Ezeelive Technologies for PHP Development? If you want the best and the easiest for you and your customers, here is your destination. Yes, Ezeelive Technologies is a pioneer in PHP development and is a name famous for its excellent services in the field. As you know, associating with...

Best LMS Development Company in India

Technological development has profoundly altered learning management system through time, generate equally profound change in the field of learning. several inspiring trend in this field comprise Cloud-based LMS, Tin Can API, MOOCs, Personalized Learning Environment as well as Bring Your Own Device (BYOD). With so much info easily accessible from manifold sources in the cloud, learners would take more and more control of their own learning, altering the role of learning professional, departments and software. New generation Learning management systems (LMS) are getting sleeker as well as more streamlined to allow Blended Learning, teamwork, synchronous (virtual) in addition to informal learning. LMSs developed by Best LMS Development Company in India host learning as well as development programs in flourishing social systems. Their offerings are intended to suit your industry needs without burning a hole in your pocket. LMS Development Company are devoted to providing solu...

Advantages of Web Application Development

Web application  is an application that is accessed over a network such as the Internet or an intranet . The term may also mean a computer software application that is coded in a browser-supported language (such as  JavaScript , combined with a browser-rendered markup language like HTML) and reliant on a common web browser to render the application executable. 1. it is cheaper to implements. For example, if you develop application with .NET you need to have clients that install windows. but in  web application , once you develop, any client can access your  web apps with any platform . 2.  web app development  are simple (once you know about  css javascript and framework ) it can make your life easier. 3. No virus and easy to deploy/install for client. 4. Only one copy of a program will ever need to be updated. 5. 99% of the code is platform independant. 6. Less chance of finding restrictions that the clients computer may have imposed...