php - I want only all array from phalcon translate object properties? -
when var_dump($t)
output this
$t = object(phalcon\translate\adapter\nativearray)[121] protected '_translate' => array (size=14) 'attendancelist' => string 'ယေန႕စာရင္း' (length=30) 'monthlylist' => string 'လစဥ္တက္ေရာက္စာရင္း' (length=54) 'bye' => string 'sayounara' (length=9) 'hi-name' => string 'bonjour %name%' (length=14) 'song' => string 'la chanson est %song%' (length=21) 'todaylist' => string '' (length=0) 'date' => string 'ရက္စြဲ' (length=18) 'username' => string 'နာမည္' (length=15) 'checkin' => string '' (length=0) 'late' => string 'ေနာက္က်ခ်ိန္' (length=36) 'checkout' => string '' (length=0) 'workingtime' => string 'အလုပ္ခ်ိန္' (length=30) 'overtime' => string 'အခ်ိန္ပို' (length=27) 'location' => string 'ေနရာ' (length=12)
i want array try
$t->_translate
not ok.but correct code
$t->_("attendancelist");
ok....however want array not individual ..
my want array
array (size=14) 'attendancelist' => string 'ယေန႕စာရင္း' (length=30) 'monthlylist' => string 'လစဥ္တက္ေရာက္စာရင္း' (length=54) 'bye' => string 'sayounara' (length=9) 'hi-name' => string 'bonjour %name%' (length=14) 'song' => string 'la chanson est %song%' (length=21) 'todaylist' => string '' (length=0) 'date' => string 'ရက္စြဲ' (length=18) 'username' => string 'နာမည္' (length=15) 'checkin' => string '' (length=0) 'late' => string 'ေနာက္က်ခ်ိန္' (length=36) 'checkout' => string '' (length=0) 'workingtime' => string 'အလုပ္ခ်ိန္' (length=30) 'overtime' => string 'အခ်ိန္ပို' (length=27) 'location' => string 'ေနရာ' (length=12)
help me array??
easiest way see implement toarray()
method:
class nativearrayext extends \phalcon\translate\adapter\nativearray { public function toarray() { return $this->_translate; } }
or reimplement _()
same if no parameter providen.
Comments
Post a Comment