Beispiel #1
0
function mageFindClassFile($class)
{
    $classFile = uc_words($class, DS) . '.php';
    $classFile = scrunchName($classFile, 3);
    $found = false;
    foreach (explode(PS, get_include_path()) as $path) {
        $fileName = $path . DS . $classFile;
        if (file_exists($fileName)) {
            $found = $fileName;
            break;
        }
    }
    return $found;
}
Beispiel #2
0
 /**
  * Render block
  *
  * @return string
  */
 public function renderView()
 {
     if (VPROF) {
         Varien_Profiler::start(__METHOD__);
     }
     $this->setScriptPath(AO::getBaseDir('design'));
     $params = array('_relative' => true);
     if ($area = $this->getArea()) {
         $params['_area'] = $area;
     }
     $templateName = Mage_Core_Model_Design_Package::getDesign()->getTemplateFilename($this->getTemplate(), $params);
     $templateName = scrunchName($templateName, 5);
     //var_dump($templateName);
     //var_dump(get_class($this));
     $html = $this->fetchView($templateName);
     if (VPROF) {
         Varien_Profiler::stop(__METHOD__);
     }
     return $html;
 }