class CategoriesModel {
private $bb = "var work";
function returnBb()
{
return $this->bb;
}
function t()
{
echo "function work";
}
}
function indexAction($smarty){
$catModel = new CategoriesModel;
echo $catModel->returnBb();
$catModel->t();
}
<?php
$bb = "var work";
function t(){
echo "function work";
}
function indexAction($smarty){
echo $smarty;
t();
}
indexAction($bb);
?>