public function getImageByName($name, $subdir, $catalog = '')
    {
        if(substr($name, 0, 1) == 'i')
            return $this->getFilePath($subdir, $catalog) . $name;
        else
            return $this->base_path . '/files/site/' . 
                substr($name, strrpos($name, '.') + 1) . '.png';
    }
public function getImageByName($name, $subdir, $catalog = '')
    {
        if(substr($name, 0, 1) == 'i')
            return $this->getFilePath($subdir, $catalog) . $name;
        else
            return $this->base_path . '/files/site/' . 
                substr($name, strrpos($name, '.') + 1) . '.png';
    }
public function getImageByName ( $ name , $ subdir , $ catalog = '' ) { if ( substr ( $ name , 0 , 1 ) == 'i' ) return $ this -> getFilePath ( $ subdir , $ catalog ) . $ name ; else return $ this -> base_path . '/files/site/' . substr ( $ name , strrpos ( $ name , '.' ) + 1 ) . '.png' ; }
Add full path to a file name

@param file $name
@param $subdir to main directory/$catalog
@param $catalog in a main dirictiry for a model
@return full file name
Add full path to a file name