Yii Framework Forum: Yii-App : Why Are Global Functions Not Available To The Console? - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Yii-App : Why Are Global Functions Not Available To The Console?

#1 User is offline   Xavier John 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 41
  • Joined: 16-August 13
  • Location:Redmond, WA

Posted 11 September 2013 - 10:41 PM

Yii-App : Why are global functions not available to the console?

Main.php has an import for helpers
    'import' => array(
        'application.helpers.*',


I also noticed the web/index.php is importing the global.php directly but not importing in yiic.php

require(__DIR__ . '/../app/helpers/global.php');


Does import only import classes?
0

#2 User is offline   nineinchnick 

  • Master Member
  • PipPipPipPip
  • Yii
  • Group: Members
  • Posts: 622
  • Joined: 12-September 11
  • Location:Bialystok, Poland

Posted 12 September 2013 - 01:23 AM

You can alter yiic.php to suit your needs and make config/main.php and config/console.php more similar. Console config is thin by default because most included staff is only web related, like widgets.
Don't be a dick.
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users