コード例 #1
0
 function __construct()
 {
     $this->counter1 = Object::construct("WHCounter");
     $this->counter2 = Object::construct("WHCounter");
     $this->counter3 = Object::construct("WHCounter");
     $this->counter4 = Object::construct("WHCounter");
 }
コード例 #2
0
 public function fromSqlValueStringWithConnection($aString, $reServeConnection)
 {
     if ($aString == NULL) {
         return NULL;
     }
     return Object::construct("REServeProxyObject")->setDatabase($reServeConnection)->setOid((int) $aString);
 }
コード例 #3
0
 public function __construct()
 {
     foreach ($this->classes as $class) {
         $objects[] = Object::construct($class);
     }
     return $this;
 }
コード例 #4
0
 public function onAnswerCallback($object, $method, $arguments = "")
 {
     if ($arguments == "") {
         $arguments = array();
     }
     $this->dialogCallback = Object::construct("WHCallback")->setObject($object)->setMethod($method)->setArguments($arguments);
     return $this;
 }
コード例 #5
0
 static function startUpOnAppWithIni($app, $app_configuration)
 {
     ini_set("session.use_cookies", $app_configuration['general']['use_cookie']);
     ini_set("session.name", "SID");
     $configuration_class = $app_configuration['general']['configuration_class'];
     $configuration = Object::construct($configuration_class);
     $configuration->setApplicationName($app)->setConfigValues($app_configuration);
     return $configuration;
 }
コード例 #6
0
 public function dayOfMeeting()
 {
     /*
      ** Lazy initialization
      */
     if ($this->dayOfMeeting == NULL) {
         $this->dayOfMeeting = Object::construct("WHDate");
     }
     return $this->dayOfMeeting;
 }
コード例 #7
0
 public function start()
 {
     parent::start();
     if (!is_object($this->db)) {
         $this->db = Object::construct($this->configuration()->configValueBySubjectAndKey("REServe", "type"));
         $this->db->setAutomaticTableCreation($automatic_table_creation);
     }
     $this->connect();
     return $this;
 }
コード例 #8
0
 public function column($aKeyPath, $aClass, $aRowName = "", $shouldUpdateValue = TRUE)
 {
     if ($aRowName == "") {
         $aRowName = $aKeyPath;
     }
     if (!is_object($aClass)) {
         $aClass = Object::construct($aClass);
     }
     $this->columns[] = Object::construct('REServeColumnDefinition')->setName($aRowName)->setKeyPath($aKeyPath)->setType($aClass)->setShouldUpdateValue($shouldUpdateValue);
     return $this;
 }
コード例 #9
0
ファイル: REArray.php プロジェクト: hellogerard/TicTacPhaux
 public function tableDefinition()
 {
     return Object::construct("REServeTableDefinition")->column("oid", "REServeCollectionId", 'objectId', FALSE)->column('parentId', REInteger)->column('key', REInteger)->column('value', $this->valueType());
 }
コード例 #10
0
 public function registerObjectOnKeyPath($anObject, $aStringKeyPath)
 {
     $this->registeredObjects[] = Object::construct("WHRegisteredObject")->setOnObject($anObject)->setKeyPath($aStringKeyPath)->setValue($anObject->getByKeyPath($aStringKeyPath));
     return $this;
 }
コード例 #11
0
 public function callbackForRemove($object, $method)
 {
     $this->removeCallback = Object::construct("WHCallback")->setObject($object)->setMethod($method);
 }
コード例 #12
0
 public function setCurrentContact($aContact)
 {
     $this->currentContactComponent = Object::construct("WHREServeModelEdit")->setReserveable($aContact);
     return $this;
 }
コード例 #13
0
ファイル: REServe.php プロジェクト: hellogerard/TicTacPhaux
 public function fromSqlValueStringWithConnection($aString, $reServeConnection)
 {
     if ($aString == NULL) {
         return NULL;
     }
     $toReturn = Object::construct("REServeProxyObject")->setDatabase($reServeConnection)->setOid((int) $aString)->setObjectClass(get_class($this));
     $reServeConnection->putInCache($toReturn);
     return $toReturn;
 }
コード例 #14
0
ファイル: WHSession.php プロジェクト: hellogerard/TicTacPhaux
 public function registerCollectionCallback($object, $method, $arguments, $collection)
 {
     $newKey = $this->newCallbackKey();
     $this->callbacks[$newKey] = Object::construct("WHCollectionCallback")->setKey($newKey)->setObject($object)->setMethod($method)->setArguments($arguments)->setItems($collection);
     return $this->callbacks[$newKey];
 }
コード例 #15
0
 public function objectForOidWithClass($anOid, $aClass)
 {
     if ($this->getFromCache($anOid) != NULL) {
         return $this->getFromCache($anOid);
     } else {
         $result = $this->executeQuery($this->queryForLookupClassWithOid($aClass, $anOid));
         $array = mysql_fetch_array($result);
         foreach (Object::construct($aClass)->tableDefinition()->columns() as $column) {
             $this->currentColumn($column);
             if ($column->type()->reServeValueStoredWithObject()) {
                 $dRow[$column->keyPath()] = $array[$column->name()];
             }
         }
         return $this->objectForOidWithClassFromArray($anOid, $aClass, $dRow);
     }
 }
コード例 #16
0
 public function yesNoDialog()
 {
     $this->callDialog(Object::construct("WHYesNoDialog")->setMessage("This is a yes no dialog.")->onAnswerCallback($this, "setYesNoAnswer"));
 }
コード例 #17
0
ファイル: phaux.php プロジェクト: hellogerard/TicTacPhaux
    $REDIRECT = TRUE;
}
if (is_array($_REQUEST["_i"])) {
    foreach ($_REQUEST["_i"] as $key => $value) {
        //var_dump($_SESSION[$app]['session']);
        if (is_object($_SESSION[$app]['session']->callbackByKey($key))) {
            $_SESSION[$app]['session']->callbackByKey($key)->runWithArgument($value);
        }
    }
    $REDIRECT = TRUE;
}
if ($_SESSION[$app]['mainComponent'] == NULL) {
    $main_class = $app_configurations[$app]['general']['main_class'];
    $_SESSION[$app]['mainComponent'] = Object::construct($main_class);
}
$htmlRoot = Object::construct("WHHtmlRoot");
$_SESSION[$app]['mainComponent']->updateRootWithChildren($htmlRoot);
foreach ($app_configurations[$app]['styles'] as $var => $value) {
    $htmlRoot->needsStyle($value);
}
foreach ($app_configurations[$app]['scripts'] as $var => $value) {
    $htmlRoot->needsScript($value);
}
/*
** If this is a live update we don't want to redirect
*/
if (isset($_REQUEST['_lu'])) {
    $REDIRECT = FALSE;
}
if ($REDIRECT) {
    $_SESSION[$app]['session']->save();
コード例 #18
0
 public function __construct()
 {
     $this->navigation = Object::construct("WHNavigation");
     $this->navigation->addWithLabel(Object::construct("WHCounter"), "Counter")->addWithLabel(Object::construct("WHFormTest"), "Form Test")->addWithLabel(Object::construct("WHMultiCounter"), "Multiple Counter")->addWithLabel(Object::construct("WHRegisteredCounter"), "Registered Counter")->addWithLabel(Object::construct("WHDialogTest"), "Dialog test")->addWithLabel(Object::construct("WHLiveTest"), "AJAX Test")->addWithLabel(Object::construct("WHExceptionTest"), "Exception Text");
     return $this;
 }
コード例 #19
0
 public function reServeObject($anObject)
 {
     $this->setCurrentObject($anObject);
     $anObject->setOid($this->oidForNewObject($anObject));
     $this->insertObject($anObject);
     $anObject->makeClean();
     $this->putInCache(Object::construct("REServeProxyObject")->setDatabase($this)->setOid($anObject->oid())->setObjectClass($anObject->getClass())->setObject($anObject));
     return $this;
 }
コード例 #20
0
 public function __construct()
 {
     $this->navigation = Object::construct("WHLiveNavigation");
     $this->navigation->addWithLabel(Object::construct("WHCounter"), "Counter")->addWithLabel(Object::construct("WHFormTest"), "Form Test");
     return $this;
 }
コード例 #21
0
ファイル: Object.php プロジェクト: hellogerard/TicTacPhaux
 /**
  * Returns an array of a string of subclass names 
  * that are a subclass of this class
  */
 public function subClasses()
 {
     $result = array();
     foreach (get_declared_classes() as $className) {
         if (is_subclass_of(Object::construct($className), get_class($this))) {
             $result[] = $className;
         }
     }
 }
コード例 #22
0
 public function constructTagWithClass($aTagName)
 {
     return Object::construct($aTagName)->setHtmlCanvas($this);
 }