Hello.
i'm having some trouble with custom helpers.
This code (same as Bakery) works:
<?php
class BarcodeHelper extends AppHelper {
var $helpers = array('Code39');
function Code39($string) {
print_r($this->helpers);
$codedData = $this->Code39->encode($string);
}
}
?>
this doesn't
<?php
class BarcodeHelper extends AppHelper {
function Code39($string) {
print_r($this->helpers);
$this->helpers[] = 'Code39';
$codedData = $this->Code39->encode($string);
}
}
?>
the PHP error output is "Undefined property: BarcodeHelper::$Code39"
in both cases the "print_r($this->helpers)" command outputs the same
thing:
Array( [0] = "Code39" )
Why the second option isn't working?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---