Example #1
0
 private function librariesCheck()
 {
     $success = true;
     $libraryRequirements = array();
     // autoloader for dependencies
     $inclPath = explode(PATH_SEPARATOR, get_include_path());
     $autoloadCallback = function ($p_class) use($inclPath) {
         foreach ($inclPath as $path) {
             $fn = DIR_SEP . trim($path, DIR_SEP) . DIR_SEP . str_replace("_", DIR_SEP, $p_class) . ".php";
             if (file_exists($fn)) {
                 require_once $fn;
                 return true;
             }
         }
         return true;
     };
     $autoloader = Zend_Loader_Autoloader::getInstance();
     $autoloader->pushAutoloader($autoloadCallback);
     $pear = CampInstallationViewHelper::CheckPear();
     $success = $pear == 'Yes' ? $success : false;
     $libraryRequirements[] = array('tag' => 'PEAR', 'exists' => $pear);
     $pearDate = CampInstallationViewHelper::CheckPearDate();
     $success = $pearDate == 'Yes' ? $success : false;
     $libraryRequirements[] = array('tag' => 'PEAR/Date', 'exists' => $pearDate);
     $pearArchiveTar = CampInstallationViewHelper::CheckPearArchiveTar();
     $success = $pearArchiveTar == 'Yes' ? $success : false;
     $libraryRequirements[] = array('tag' => 'PEAR/Archive', 'exists' => $pearArchiveTar);
     $pearEventDispatcher = CampInstallationViewHelper::CheckPearEventDispatcher();
     $success = $pearEventDispatcher == 'Yes' ? $success : false;
     $libraryRequirements[] = array('tag' => 'PEAR/Event Dispatcher', 'exists' => $pearEventDispatcher);
     $pearMail = CampInstallationViewHelper::CheckPearMail();
     $success = $pearMail == 'Yes' ? $success : false;
     $libraryRequirements[] = array('tag' => 'PEAR/Mail', 'exists' => $pearMail);
     $pearMailMime = CampInstallationViewHelper::CheckPearMailMime();
     $success = $pearMailMime == 'Yes' ? $success : false;
     $libraryRequirements[] = array('tag' => 'PEAR/Mail_mime', 'exists' => $pearMailMime);
     $pearXmlSerializer = CampInstallationViewHelper::CheckPearXmlSerializer();
     $success = $pearXmlSerializer == 'Yes' ? $success : false;
     $libraryRequirements[] = array('tag' => 'PEAR/XML_Serializer', 'exists' => $pearXmlSerializer);
     $pearXmlParser = CampInstallationViewHelper::CheckPearXmlParser();
     $success = $pearXmlParser == 'Yes' ? $success : false;
     $libraryRequirements[] = array('tag' => 'PEAR/XML_Parser', 'exists' => $pearXmlParser);
     $pearHtmlCommon = CampInstallationViewHelper::CheckPearHtmlCommon();
     $success = $pearHtmlCommon == 'Yes' ? $success : false;
     $libraryRequirements[] = array('tag' => 'PEAR/HTML_Common', 'exists' => $pearHtmlCommon);
     $zendFramework = CampInstallationViewHelper::CheckZendFramework();
     $success = $zendFramework == 'Yes' ? $success : false;
     $libraryRequirements[] = array('tag' => 'Zend Framework (1.11.5 or newer)', 'exists' => $zendFramework);
     $smarty = CampInstallationViewHelper::CheckSmarty();
     $success = $smarty == 'Yes' ? $success : false;
     $libraryRequirements[] = array('tag' => 'Smarty', 'exists' => $smarty);
     $this->m_lists['libraryRequirements'] = $libraryRequirements;
     // removing that autoloader
     $autoloader->removeAutoloader($autoloadCallback);
     return $success;
 }