Example #1
0
 public function write($session_id, $session_data)
 {
     $session = $this->app->getStore()->getManager()->getRepository('systemBundle:RaptorSession')->findOneBy(array('name' => $session_id));
     if ($session) {
         $session->setData($session_data);
         $session->setTime(time());
         $this->app->getStore()->getManager()->persist($session);
     } else {
         $session = new \Raptor\Component\systemBundle\Model\Entity\RaptorSession();
         $session->setName($session_id);
         $session->setData($session_data);
         $session->setTime(time());
         $this->app->getStore()->getManager()->persist($session);
     }
     $this->app->getStore()->getManager()->flush();
     return true;
 }
Example #2
0
 * @author      William Amed <*****@*****.**>, Otto Haus <*****@*****.**>
 * @copyright   2014 
 * @link        http://dinobyte.net
 * @version     2.0.1
 * @package     Raptor
 *
 * MIT LICENSE
 *
 * Permission is hereby granted, free of charge, to any person obtaining
 * a copy of this software and associated documentation files (the
 * "Software"), to deal in the Software without restriction, including
 * without limitation the rights to use, copy, modify, merge, publish,
 * distribute, sublicense, and/or sell copies of the Software, and to
 * permit persons to whom the Software is furnished to do so, subject to
 * the following conditions:
 *
 * The above copyright notice and this permission notice shall be
 * included in all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
 * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
 * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 */
require '../libs/autoload.php';
$app = new Raptor\Raptor(array('mode' => 'production', 'debug' => FALSE));
$app->add(new \Slim\Middleware\ContentTypes());
$app->run();
Example #3
0
<?php

/*
 * Este archivo realiza el proceso de actualizacion de componentes
 * y clases que no pertenecen al paquete de clases de Raptor
 * Utilizados para realizar mantenimeinto y actualizacion a Slim, los
 * Bundles utilitarios y recursos.
 */
$app = Raptor\Raptor::getInstance();
$lib = \Raptor\Core\Location::get(\Raptor\Core\Location::APP) . '/../libs';
/**
 * Updates files
 * array(
 *      array('file_to_copy','file_to_override')
 * )
 */
$files = array(array('/BundleImporter.php', '/../src/Raptor2/InstallerBundle/Importer/BundleImporter.php'), array('/Slim.php', '/Slim/Slim.php'), array('/autoload.php', '/autoload.php'));
foreach ($files as $value) {
    if (file_exists($lib . $value[1]) and file_exists(__DIR__ . $value[0])) {
        Raptor\Util\Files::delete($lib . $value[1]);
        Raptor\Util\Files::copy(__DIR__ . $value[0], dirname($lib . $value[1]));
        Raptor\Util\Files::delete(__DIR__ . $value[0]);
    }
}
/**
 * Copy new ones
 * array(
 *      array('file_to_copy','directory_to_copy')
 * )
 */
$files_new = array();