private static function _open()
 {
     $res = '<StampMaster>';
     $res .= '<version>' . Version::getVersion() . '</version>';
     $res .= '</StampMaster>';
     return $res;
 }
Esempio n. 2
0
 /**
  * System Exception Handler
  *
  * @param \Exception $exception The exception to handle
  *
  * @return void
  */
 public function handleException(\Exception $exception)
 {
     fwrite(STDERR, "\n\nOups... phpDox encountered a problem and has terminated!\n");
     fwrite(STDERR, "\nIt most likely means you've found a bug, so please file a report for this\n");
     fwrite(STDERR, "and paste the following details and the stacktrace (if given) along:\n\n");
     fwrite(STDERR, "PHP Version: " . PHP_VERSION . " (" . PHP_OS . ")\n");
     fwrite(STDERR, "PHPDox Version: " . $this->version->getVersion() . "\n");
     $this->renderException($exception);
     fwrite(STDERR, "\n\n\n");
 }
 /**
  * Renders the view. It simply gets all the parameters we've been adding to it
  * and puts them in the context of the template renderer so that they can be accessed
  * as normal parameters from within the template
  */
 function render()
 {
     // set the view character set based on the default locale
     $config =& Config::getConfig();
     $locale =& Locales::getLocale($config->getValue("default_locale"));
     $this->setValue('version', Version::getVersion());
     $this->setCharset($locale->getCharset());
     parent::render();
     // to find the template we need, we can use the TemplateService
     $ts = new TemplateService();
     $template = $ts->Template(DEFAULTADMIN_TEMPLATE, "admin");
     $this->setValue("locale", $locale);
     // assign all the values
     $template->assign($this->_params->getAsArray());
     // and send the results
     print $template->fetch();
 }
 function render()
 {
     // set the view character set based on the default locale
     $config =& Config::getConfig();
     $locale =& Locales::getLocale($config->getValue("default_locale"));
     $this->setValue('version', Version::getVersion());
     $this->setCharset($locale->getCharset());
     parent::render();
     // load the contents into the template context
     $ts = new TemplateService();
     $template = $ts->Template(ADMINSIMPLEMESSAGE_TEMPLATE, "admin");
     $this->setValue("locale", $locale);
     // and pass the values to the template
     $template->assign($this->_params->getAsArray());
     // finally, send the results
     print $template->fetch();
 }
 /**
  * call the View::render() method.
  */
 function render()
 {
     // set a few common parametres...
     $config =& Config::getConfig();
     $this->setValue('baseurl', $config->getValue('base_url'));
     $this->setValue('version', Version::getVersion());
     $this->setValue('uploads_enabled', $config->getValue('uploads_enabled'));
     //
     // stuff to generate the menu on the left
     //
     $menu =& Menu::getMenu();
     // initialize the menu renderer, passing as parameters the original menu structure,
     // the current logged in user (so that we can check permissions and so on)
     // and the current value of the 'op' parameter so that we can now which option is the
     // current active one
     $menuRenderer = new MenuRenderer($menu, $this->_blogInfo, $this->_userInfo);
     //$this->setValue( "menus", $menuRenderer->generateAt("Manage"));
     $this->setValue('menu', $menuRenderer);
     parent::render();
 }
Esempio n. 6
0
    /**
     * Add the Dialog for TinyMCE
     * @static
     * @since 1.6
     */
    static function OutputTinyMCEDialogVars()
    {
        $data = array('pluginVersion' => Version::getVersion(), 'includesUrl' => includes_url(), 'pluginsUrl' => plugins_url());
        ?>

    <script type="text/javascript">
        // <![CDATA[
        window.mixcloudEmbedDialogData = <?php 
        echo json_encode($data);
        ?>
;
        // ]]>
    </script>
<?php 
    }
Esempio n. 7
0
 function render()
 {
     // build the file name
     $templateFileName = "wizard/" . $this->_templateName . ".template";
     //$t = new Template( $templateFileName, "" );
     $t = new Smarty();
     $v = new Version();
     $this->_params->setValue("version", $v->getVersion());
     $this->_params->setValue("projectPage", $v->getProjectPage());
     $this->_params->setValue("safeMode", ini_get("safe_mode"));
     $t->assign($this->_params->getAsArray());
     $t->template_dir = "./templates";
     $t->compile_dir = TEMP_FOLDER;
     $t->cache_dir = TEMP_FOLDER;
     $t->use_sub_dirs = false;
     $t->caching = false;
     print $t->fetch($templateFileName);
 }
Esempio n. 8
0
 public function testConstructorCastToInt()
 {
     $version = new Version('1.0');
     $this->assertEquals(1, $version->getVersion());
     $this->assertInternalType('integer', $version->getVersion());
 }
Esempio n. 9
0
<?php

include_once 'soap/classDef.php';
include_once 'soap/login.php';
include 'soap/Version.php';
$version = new Version("https://ecws.e-control.at/axis2/services/Version?wsdl", $options);
//$version = new Version();
$vResp = $version->getVersion();
echo $vResp->return . "<br/>\n";
include 'soap/logout.php';
 function showAction()
 {
     $this->version = Version::getVersion();
     $this->layout = 'default';
     $this->render('version/show');
 }
 private function updateVersion(Addon $addon, Version $package)
 {
     $version = null;
     if ($addon->isInDB()) {
         $version = $addon->Versions()->filter('Version', $package->getVersionNormalized())->first();
     }
     if (!$version) {
         $version = new AddonVersion();
     }
     $version->Name = $package->getName();
     $version->Type = str_replace('silverstripe-', '', $package->getType());
     $version->Description = $package->getDescription();
     $version->Released = strtotime($package->getTime());
     $keywords = $package->getKeywords();
     if ($keywords) {
         foreach ($keywords as $keyword) {
             $keyword = AddonKeyword::get_by_name($keyword);
             $addon->Keywords()->add($keyword);
             $version->Keywords()->add($keyword);
         }
     }
     $version->Version = $package->getVersionNormalized();
     $version->PrettyVersion = $package->getVersion();
     $stability = VersionParser::parseStability($package->getVersion());
     $isDev = $stability === 'dev';
     $version->Development = $isDev;
     $version->SourceType = $package->getSource()->getType();
     $version->SourceUrl = $package->getSource()->getUrl();
     $version->SourceReference = $package->getSource()->getReference();
     if ($package->getDist()) {
         $version->DistType = $package->getDist()->getType();
         $version->DistUrl = $package->getDist()->getUrl();
         $version->DistReference = $package->getDist()->getReference();
         $version->DistChecksum = $package->getDist()->getShasum();
     }
     $version->Extra = $package->getExtra();
     $version->Homepage = $package->getHomepage();
     $version->License = $package->getLicense();
     // $version->Support = $package->getSupport();
     $addon->Versions()->add($version);
     $this->updateLinks($version, $package);
     $this->updateCompatibility($addon, $version, $package);
     $this->updateAuthors($version, $package);
 }
Esempio n. 12
0
        <?php 
        } else {
            if ($do == 'add') {
                $version = $_POST['version'];
                ?>
        <?php 
                switch ($_POST['ver']) {
                    case "alpha":
                        $version .= '&alpha;';
                        break;
                    case "beta":
                        $version .= '&beta;';
                        break;
                }
                Version::create($version);
                Event::addEvent('Version ' . $version . ' has been added.', $_SESSION['user'], 1);
            }
        }
    } else {
        if ($action == 'current') {
            $version = new Version($_GET['id']);
            $version->makeCurrent();
            Event::addEvent('Version ' . $version->getVersion() . ' is now the current version.', $_SESSION['user'], 2);
            ?>
    <script>
        load('version', 'none', 'none');
    </script>
    <?php 
        }
    }
}
 /**
  * Sets some  in this case, we leave it all up to the child classes to reimplement
  * this and by default call View::render()
  *
  * @returns always true
  */
 function render()
 {
     if (!$this->isCached()) {
         // and then add our stuff to the view...
         $this->setValue('archives', $this->_getArchives());
         $this->setValue('recentposts', $this->_getRecentPosts());
         $this->setValue('mylinkscategories', $this->_getLinkCategories());
         $this->setValue('monthposts', $this->_getMonthPosts());
         $this->setValue('articlecategories', $this->_getArticleCategories());
         $this->generateCalendar($this->getValue('Year'), $this->getValue('Month'));
         // also, let's not forget about the plugins...
         // put the plugins in the context
         $plugins = $this->_pm->getPlugins();
         foreach ($plugins as $name => $plugin) {
             $this->setValue($name, $plugin);
         }
     }
     //
     // these things can go in since they do not mean much overhead when generating the view...
     //
     $this->setValue('locale', $this->_blogInfo->getLocale());
     $this->setValue('version', Version::getVersion());
     $this->setValue('now', new Timestamp());
     $this->setValue('blog', $this->_blogInfo);
     $this->setValue('url', $this->_blogInfo->getBlogRequestGenerator());
     $this->setValue('utils', $this->_blogInfo->getBlogRequestGenerator());
     $this->setValue('blogsettings', $this->_blogInfo->getSettings());
     $this->setValue('rss', new RssParser());
     // ask the parent to do something, if needed
     parent::render();
 }