Yii Framework Forum: number formater - Yii Framework Forum

Jump to content

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

number formater Rate Topic: -----

#1 User is offline   got 2 doodle 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 248
  • Joined: 12-December 08
  • Location:Beautiful Nova Scotia, Canada

Posted 09 February 2010 - 02:30 PM

according to the text in /framework/utils/CFormatter.php()


Therefore, one may call <code>Yii::app()->format->boolean(1)</code>


however I am unable to get it to work

$value = Yii::app()->format->boolean(1);


gives this error

Quote

Description

Wrong parameter count for method_exists()
Source File

/framework/utils/CFormatter.php(85)



I wish I was smarter!
but I can't seem to figure this one out.

anyone got any suggestions?
Check out myYii powered website
0

#2 User is offline   Y!! 

  • Advanced Member
  • Yii
  • Group: Yii Dev Team
  • Posts: 978
  • Joined: 18-June 09

Posted 09 February 2010 - 02:34 PM

Does formatBoolean() works? boolean() is a shortcut for that function.
0

#3 User is offline   got 2 doodle 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 248
  • Joined: 12-December 08
  • Location:Beautiful Nova Scotia, Canada

Posted 09 February 2010 - 02:50 PM

yes, thank you!
$value = Yii::app()->format->formatBoolean(1);


this worked

My original intention was to format a currency value

so at least I am getting something happening now

Thanks,
doodle
Check out myYii powered website
0

#4 User is offline   Y!! 

  • Advanced Member
  • Yii
  • Group: Yii Dev Team
  • Posts: 978
  • Joined: 18-June 09

Posted 09 February 2010 - 05:53 PM

Ok good. I've noticed this bug is already fixed in svn, so you may use the latest revision for developing. :)
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