Example #1
0
 /**
  * Iterates through given data and delegates it to IDS_Monitor::_detect() in
  * order to check for malicious appearing fragments
  *
  * @param mixed $key   the former array key
  * @param mixed $value the former array value
  *
  * @return void
  */
 private function _iterate($key, $value)
 {
     if (!is_array($value)) {
         if (is_string($value)) {
             if ($filter = $this->_detect($key, $value)) {
                 include_once 'IDS/Event.php';
                 $this->report->addEvent(new IDS_Event($key, $value, $filter));
             }
         }
     } else {
         foreach ($value as $subKey => $subValue) {
             $this->_iterate($key . '.' . $subKey, $subValue);
         }
     }
 }
 /**
  * Sets contents of passed object to values from current object.
  *
  * If desired, this method can also make copies of all associated (fkey referrers)
  * objects.
  *
  * @param      object $copyObj An object of \User (or compatible) type.
  * @param      boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row.
  * @param      boolean $makeNew Whether to reset autoincrement PKs and make the object new.
  * @throws PropelException
  */
 public function copyInto($copyObj, $deepCopy = false, $makeNew = true)
 {
     $copyObj->setRcsId($this->getRcsId());
     $copyObj->setFirstName($this->getFirstName());
     $copyObj->setLastName($this->getLastName());
     $copyObj->setEmail($this->getEmail());
     $copyObj->setPermissionLevel($this->getPermissionLevel());
     if ($deepCopy) {
         // important: temporarily setNew(false) because this affects the behavior of
         // the getter/setter methods for fkey referrer objects.
         $copyObj->setNew(false);
         foreach ($this->getEvents() as $relObj) {
             if ($relObj !== $this) {
                 // ensure that we don't try to copy a reference to ourselves
                 $copyObj->addEvent($relObj->copy($deepCopy));
             }
         }
         foreach ($this->getInterests() as $relObj) {
             if ($relObj !== $this) {
                 // ensure that we don't try to copy a reference to ourselves
                 $copyObj->addInterest($relObj->copy($deepCopy));
             }
         }
         foreach ($this->getComments() as $relObj) {
             if ($relObj !== $this) {
                 // ensure that we don't try to copy a reference to ourselves
                 $copyObj->addComment($relObj->copy($deepCopy));
             }
         }
     }
     // if ($deepCopy)
     if ($makeNew) {
         $copyObj->setNew(true);
         $copyObj->setUserId(NULL);
         // this is a auto-increment column, so set to default value
     }
 }
 /**
  * Retorna el campo checkbox que acompaƱa cada registro cuando el evento global esta activo
  *
  * @param $getNumFldsAftd       Numero de campos afectados
  * @param $cadParam                     Columnas ordenadas
  * @return string
  */
 private function returnCheckBox($getNumFldsAftd, $cadParam)
 {
     $htmlGlobal = '';
     if ($this->globalEventOnColumn) {
         list($alsGbl) = explode('::', $this->globalEventOnColumn);
         $nmChk = $this->idList . '_over_all';
         $this->objForm->addEvent($nmChk, 'onclick', 'checkAllBoxesOnList', $this->idList, $nmChk, $getNumFldsAftd, $cadParam);
         $htmlGlobal = $this->objForm->getCheckBox($nmChk);
     }
     return $htmlGlobal;
 }
 /**
  * Send the data to Keen.io
  *
  * @param  array $data the data to send.
  * @return void
  */
 private function send_data($data)
 {
     $this->client->addEvent($this->plugin_name, $data);
 }