예제 #1
0
<?php

require_once '../raxan/pdi/autostart.php';
Raxan::loadPlugin('plugins/showdate.php', true);
class NewPage extends RaxanWebPage
{
    protected function _config()
    {
        $this->masterTemplate = 'views/master.homepage.html';
    }
}
?>

<h3>Date/Time Plugin test page</h3>
<p>
    Lorem ipsum cu nam impedit efficiantur, ei aperiri dissentiet eos, mea dico error saperet in.
    Vidisse pertinax deterruisset id vel, dicunt audire labitur his eu. Pro magna propriae at,
    augue choro quodsi est eu. Tota cotidieque reformidans ei qui, ad dicit impetus persequeris pri,
    harum accommodare id per. Mediocrem quaerendum cu has, habeo inermis nominati eu sed.
</p>
<form name="form1" action="" method="post">
    <input type="submit" name="submit1" id="submit1" value="Reload page" class="button" />
</form>
예제 #2
0
 function testLoadPlugin()
 {
     $file = 'plugin/myplugin.php';
     $ok = Raxan::loadPlugin($file, true);
     $this->ok($ok, 'Load plugin file');
     // plugins are self-registered
 }
예제 #3
0
 /**
  * Loads a plugin from the plugins folder.
  * Usage: <p>Raxan::loadPlugin($name,$alias)</p>
  *        <p>Raxan::loadPlugin($name,$extrn,$alias)</p>
  * @param string $name Name of plugin file without the .php extension
  * @param boolean $extrn Set to true if plugin will be loaded from a folder that's not relative to {plugins.path}
  * @param string $alias Page propery instance name
  * @return mixed Returns an instance of the plugin
  */
 public function loadPlugin($name, $extrn = false, $alias = null)
 {
     if ($extrn && $extrn !== true && $alias === null) {
         $alias = $extrn;
         $extrn = false;
     }
     $ins = Raxan::loadPlugin($name, $extrn, $alias);
     self::$customProps[$alias] = $ins;
     return $ins;
 }