Author: rodchyn
Date: 2010-03-16 18:30:26 +0100 (Tue, 16 Mar 2010)
New Revision: 28568

Added:
   plugins/sfUserOnlinePlugin/LICENSE
   plugins/sfUserOnlinePlugin/README
   plugins/sfUserOnlinePlugin/config/
   plugins/sfUserOnlinePlugin/config/sfUserOnlinePluginConfiguration.class.php
   plugins/sfUserOnlinePlugin/package.xml.tmpl
   plugins/sfUserOnlinePlugin/test/
   plugins/sfUserOnlinePlugin/test/bin/
   plugins/sfUserOnlinePlugin/test/bin/prove.php
   plugins/sfUserOnlinePlugin/test/bootstrap/
   plugins/sfUserOnlinePlugin/test/bootstrap/functional.php
   plugins/sfUserOnlinePlugin/test/bootstrap/unit.php
   plugins/sfUserOnlinePlugin/test/fixtures/
   plugins/sfUserOnlinePlugin/test/fixtures/project/
   plugins/sfUserOnlinePlugin/test/fixtures/project/apps/
   plugins/sfUserOnlinePlugin/test/fixtures/project/apps/frontend/
   plugins/sfUserOnlinePlugin/test/fixtures/project/apps/frontend/config/
   plugins/sfUserOnlinePlugin/test/fixtures/project/apps/frontend/config/app.yml
   
plugins/sfUserOnlinePlugin/test/fixtures/project/apps/frontend/config/cache.yml
   
plugins/sfUserOnlinePlugin/test/fixtures/project/apps/frontend/config/factories.yml
   
plugins/sfUserOnlinePlugin/test/fixtures/project/apps/frontend/config/filters.yml
   
plugins/sfUserOnlinePlugin/test/fixtures/project/apps/frontend/config/frontendConfiguration.class.php
   
plugins/sfUserOnlinePlugin/test/fixtures/project/apps/frontend/config/routing.yml
   
plugins/sfUserOnlinePlugin/test/fixtures/project/apps/frontend/config/security.yml
   
plugins/sfUserOnlinePlugin/test/fixtures/project/apps/frontend/config/settings.yml
   
plugins/sfUserOnlinePlugin/test/fixtures/project/apps/frontend/config/view.yml
   plugins/sfUserOnlinePlugin/test/fixtures/project/apps/frontend/i18n/
   plugins/sfUserOnlinePlugin/test/fixtures/project/apps/frontend/lib/
   
plugins/sfUserOnlinePlugin/test/fixtures/project/apps/frontend/lib/myUser.class.php
   plugins/sfUserOnlinePlugin/test/fixtures/project/apps/frontend/modules/
   plugins/sfUserOnlinePlugin/test/fixtures/project/apps/frontend/templates/
   
plugins/sfUserOnlinePlugin/test/fixtures/project/apps/frontend/templates/layout.php
   plugins/sfUserOnlinePlugin/test/fixtures/project/cache/
   plugins/sfUserOnlinePlugin/test/fixtures/project/config/
   
plugins/sfUserOnlinePlugin/test/fixtures/project/config/ProjectConfiguration.class.php
   plugins/sfUserOnlinePlugin/test/fixtures/project/config/properties.ini
   plugins/sfUserOnlinePlugin/test/fixtures/project/config/rsync_exclude.txt
   plugins/sfUserOnlinePlugin/test/fixtures/project/data/
   plugins/sfUserOnlinePlugin/test/fixtures/project/data/fixtures/
   plugins/sfUserOnlinePlugin/test/fixtures/project/data/fixtures/fixtures.yml
   plugins/sfUserOnlinePlugin/test/fixtures/project/lib/
   plugins/sfUserOnlinePlugin/test/fixtures/project/lib/form/
   plugins/sfUserOnlinePlugin/test/fixtures/project/lib/form/BaseForm.class.php
   plugins/sfUserOnlinePlugin/test/fixtures/project/log/
   plugins/sfUserOnlinePlugin/test/fixtures/project/plugins/
   plugins/sfUserOnlinePlugin/test/fixtures/project/symfony
   plugins/sfUserOnlinePlugin/test/fixtures/project/test/
   plugins/sfUserOnlinePlugin/test/fixtures/project/test/bootstrap/
   
plugins/sfUserOnlinePlugin/test/fixtures/project/test/bootstrap/functional.php
   plugins/sfUserOnlinePlugin/test/fixtures/project/test/bootstrap/unit.php
   plugins/sfUserOnlinePlugin/test/fixtures/project/test/functional/
   plugins/sfUserOnlinePlugin/test/fixtures/project/test/unit/
   plugins/sfUserOnlinePlugin/test/fixtures/project/web/
   plugins/sfUserOnlinePlugin/test/fixtures/project/web/.htaccess
   plugins/sfUserOnlinePlugin/test/fixtures/project/web/css/
   plugins/sfUserOnlinePlugin/test/fixtures/project/web/css/main.css
   plugins/sfUserOnlinePlugin/test/fixtures/project/web/images/
   plugins/sfUserOnlinePlugin/test/fixtures/project/web/js/
   plugins/sfUserOnlinePlugin/test/fixtures/project/web/robots.txt
   plugins/sfUserOnlinePlugin/test/fixtures/project/web/uploads/
   plugins/sfUserOnlinePlugin/test/fixtures/project/web/uploads/assets/
   plugins/sfUserOnlinePlugin/test/functional/
   plugins/sfUserOnlinePlugin/test/unit/
Modified:
   plugins/sfUserOnlinePlugin/
   plugins/sfUserOnlinePlugin/lib/sfUserOnline.class.php
Log:
Add some changes


Property changes on: plugins/sfUserOnlinePlugin
___________________________________________________________________
Added: svn:ignore
   + *.tgz


Added: plugins/sfUserOnlinePlugin/LICENSE
===================================================================
--- plugins/sfUserOnlinePlugin/LICENSE                          (rev 0)
+++ plugins/sfUserOnlinePlugin/LICENSE  2010-03-16 17:30:26 UTC (rev 28568)
@@ -0,0 +1,7 @@
+Copyright (c) 2010 Yura Rodchyn
+
+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. 
\ No newline at end of file

Added: plugins/sfUserOnlinePlugin/README
===================================================================
--- plugins/sfUserOnlinePlugin/README                           (rev 0)
+++ plugins/sfUserOnlinePlugin/README   2010-03-16 17:30:26 UTC (rev 28568)
@@ -0,0 +1,40 @@
+sfUserOnlinePlugin
+==================
+This plugin allow you to manage user status by changing user class in your 
factories.yml to sfUserOnline. This class 
+extends sfUser class and you don't drop any user logic.
+
+## Installation
+
+Run from command line
+
+    php symfony plugin:install sfUserOnlinePlugin
+
+Add or select sfUser method to get user unique ID.
+It can be sfUser::getUserName or sfUser::getId and set it in factories.yml
+
+Set in factories.yml 
+
+    user:
+     class: sfUserOnline
+     param:
+       user_unique_method:  "getId" # sfUser method to get unique user ID
+       memcache_host:       "127.0.0.1"
+       memcache_port:       11211
+       status_lifetime:     600
+       memcache_prefix:     "ustatus_"
+       online_status_class: onlineMemcacheStorage
+
+Retrieve user status
+====================
+
+To get self status
+    
+    $this->getUser()->getStatus();
+
+To set self status
+    
+    $this->getUser()->setStatus($status);
+
+To get other user status
+   
+    $this->getUser()->getStatusForUser($userId);
\ No newline at end of file

Added: 
plugins/sfUserOnlinePlugin/config/sfUserOnlinePluginConfiguration.class.php
===================================================================
--- plugins/sfUserOnlinePlugin/config/sfUserOnlinePluginConfiguration.class.php 
                        (rev 0)
+++ plugins/sfUserOnlinePlugin/config/sfUserOnlinePluginConfiguration.class.php 
2010-03-16 17:30:26 UTC (rev 28568)
@@ -0,0 +1,21 @@
+<?php
+
+/**
+ * sfUserOnlinePlugin configuration.
+ * 
+ * @package     sfUserOnlinePlugin
+ * @subpackage  config
+ * @author      Yura Rodchyn <[email protected]>
+ * @version     SVN: $Id: PluginConfiguration.class.php 17207 2009-04-10 
15:36:26Z Kris.Wallsmith $
+ */
+class sfUserOnlinePluginConfiguration extends sfPluginConfiguration
+{
+  const VERSION = '1.0.0-DEV';
+
+  /**
+   * @see sfPluginConfiguration
+   */
+  public function initialize()
+  {
+  }
+}

Modified: plugins/sfUserOnlinePlugin/lib/sfUserOnline.class.php
===================================================================
--- plugins/sfUserOnlinePlugin/lib/sfUserOnline.class.php       2010-03-16 
16:56:42 UTC (rev 28567)
+++ plugins/sfUserOnlinePlugin/lib/sfUserOnline.class.php       2010-03-16 
17:30:26 UTC (rev 28568)
@@ -39,14 +39,15 @@
         if($status = $this->getStatus()) {
             if (!$this->statusHolder->replace($this->userUniqueId, $status)) {
                 $this->statusHolder->set($this->userUniqueId, $status);
+                $this->dispatcher->notify(new sfEvent($this, 
'user.change_status', array('status' => $status)));
             }
-            $this->dispatcher->notify(new sfEvent($this, 'user.change_status', 
array('status' => $status)));
         } else {
             return false;
         }
     }
     public function setOffline()
     {
+        $this->dispatcher->notify(new sfEvent($this, 'user.change_status', 
array('status' => 'Offline')));
         return $this->statusHolder->delete($this->userUniqueId);
     }
     public function isOnline()
@@ -56,6 +57,7 @@
     
     public function setStatus($status)
     {
+        $this->dispatcher->notify(new sfEvent($this, 'user.change_status', 
array('status' => $status)));
         return $this->statusHolder->set($this->userUniqueId, $status);
     }
     
@@ -64,6 +66,11 @@
         return $this->statusHolder->get($this->userUniqueId);
     }
     
+    public function getStatusForUser($userId)
+    {
+        return $this->statusHolder->get($this->userUniqueId);
+    }
+    
     public function getId()
     {
         throw new Exception("Replace this method to get user unique id");

Added: plugins/sfUserOnlinePlugin/package.xml.tmpl
===================================================================
--- plugins/sfUserOnlinePlugin/package.xml.tmpl                         (rev 0)
+++ plugins/sfUserOnlinePlugin/package.xml.tmpl 2010-03-16 17:30:26 UTC (rev 
28568)
@@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="##ENCODING##"?>
+<package xmlns="http://pear.php.net/dtd/package-2.0"; 
xmlns:tasks="http://pear.php.net/dtd/tasks-1.0"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; packagerversion="1.4.1" 
version="2.0" xsi:schemaLocation="http://pear.php.net/dtd/tasks-1.0 
http://pear.php.net/dtd/tasks-1.0.xsd http://pear.php.net/dtd/package-2.0 
http://pear.php.net/dtd/package-2.0.xsd";>
+  <name>sfUserOnlinePlugin</name>
+  <channel>plugins.symfony-project.org</channel>
+  <summary>User status plugin</summary>
+  <description>This plugin allow you to manage user status by changing user 
class in your factories.yml to sfUserOnline. This class extends sfUser class 
and you don't drop any user logic.</description>
+  <lead>
+    <name>Yura Rodchyn</name>
+    <user>rodchyn</user>
+    <email>[email protected]</email>
+    <active>yes</active>
+  </lead>
+  <date>##CURRENT_DATE##</date>
+  <version>
+    <release>##PLUGIN_VERSION##</release>
+    <api>##API_VERSION##</api>
+  </version>
+  <stability>
+    <release>##STABILITY##</release>
+    <api>##STABILITY##</api>
+  </stability>
+  <license uri="http://www.symfony-project.org/license";>MIT license</license>
+  <notes>-</notes>
+  <contents>
+    ##CONTENTS##
+  </contents>
+  <dependencies>
+    <required>
+      <php>
+        <min>5.2.4</min>
+      </php>
+      <pearinstaller>
+        <min>1.4.1</min>
+      </pearinstaller>
+      <package>
+        <name>symfony</name>
+        <channel>pear.symfony-project.com</channel>
+        <min>1.3.0</min>
+        <max>1.4.0</max>
+        <exclude>1.2.0</exclude>
+        <exclude>1.1.0</exclude>
+        <exclude>1.0.0</exclude>
+      </package>
+    </required>
+  </dependencies>
+  <phprelease></phprelease>
+  <changelog>
+    <release>
+      <version>
+        <release>1.0.1</release>
+        <api>1.0.1</api>
+      </version>
+      <stability>
+       <release>stable</release>
+       <api>stable</api>
+      </stability>
+      <license uri="http://www.symfony-project.org/license";>MIT 
license</license>
+      <date>2008-08-14</date>
+      <license>MIT</license>
+      <notes>
+        * me: add getStatusForUser($user_id) to retrieve user status
+        * me: add some description
+      </notes>
+    </release>
+  </changelog>
+</package>

Added: plugins/sfUserOnlinePlugin/test/bin/prove.php
===================================================================
--- plugins/sfUserOnlinePlugin/test/bin/prove.php                               
(rev 0)
+++ plugins/sfUserOnlinePlugin/test/bin/prove.php       2010-03-16 17:30:26 UTC 
(rev 28568)
@@ -0,0 +1,8 @@
+<?php
+
+include dirname(__FILE__).'/../bootstrap/unit.php';
+
+$h = new lime_harness(new lime_output_color());
+$h->register(sfFinder::type('file')->name('*Test.php')->in(dirname(__FILE__).'/..'));
+
+exit($h->run() ? 0 : 1);

Added: plugins/sfUserOnlinePlugin/test/bootstrap/functional.php
===================================================================
--- plugins/sfUserOnlinePlugin/test/bootstrap/functional.php                    
        (rev 0)
+++ plugins/sfUserOnlinePlugin/test/bootstrap/functional.php    2010-03-16 
17:30:26 UTC (rev 28568)
@@ -0,0 +1,21 @@
+<?php
+
+if (!isset($app))
+{
+  $app = 'frontend';
+}
+
+require_once $_SERVER['SYMFONY'].'/autoload/sfCoreAutoload.class.php';
+sfCoreAutoload::register();
+
+function sfUserOnlinePlugin_cleanup()
+{
+  sfToolkit::clearDirectory(dirname(__FILE__).'/../fixtures/project/cache');
+  sfToolkit::clearDirectory(dirname(__FILE__).'/../fixtures/project/log');
+}
+sfUserOnlinePlugin_cleanup();
+register_shutdown_function('sfUserOnlinePlugin_cleanup');
+
+require_once 
dirname(__FILE__).'/../fixtures/project/config/ProjectConfiguration.class.php';
+$configuration = ProjectConfiguration::getApplicationConfiguration($app, 
'test', isset($debug) ? $debug : true);
+sfContext::createInstance($configuration);

Added: plugins/sfUserOnlinePlugin/test/bootstrap/unit.php
===================================================================
--- plugins/sfUserOnlinePlugin/test/bootstrap/unit.php                          
(rev 0)
+++ plugins/sfUserOnlinePlugin/test/bootstrap/unit.php  2010-03-16 17:30:26 UTC 
(rev 28568)
@@ -0,0 +1,30 @@
+<?php
+
+if (!isset($_SERVER['SYMFONY']))
+{
+  throw new RuntimeException('Could not find symfony core libraries.');
+}
+
+require_once $_SERVER['SYMFONY'].'/autoload/sfCoreAutoload.class.php';
+sfCoreAutoload::register();
+
+$configuration = new 
sfProjectConfiguration(dirname(__FILE__).'/../fixtures/project');
+require_once $configuration->getSymfonyLibDir().'/vendor/lime/lime.php';
+
+function sfUserOnlinePlugin_autoload_again($class)
+{
+  $autoload = sfSimpleAutoload::getInstance();
+  $autoload->reload();
+  return $autoload->autoload($class);
+}
+spl_autoload_register('sfUserOnlinePlugin_autoload_again');
+
+if (file_exists($config = 
dirname(__FILE__).'/../../config/sfUserOnlinePluginConfiguration.class.php'))
+{
+  require_once $config;
+  $plugin_configuration = new sfUserOnlinePluginConfiguration($configuration, 
dirname(__FILE__).'/../..', 'sfUserOnlinePlugin');
+}
+else
+{
+  $plugin_configuration = new sfPluginConfigurationGeneric($configuration, 
dirname(__FILE__).'/../..', 'sfUserOnlinePlugin');
+}

Added: 
plugins/sfUserOnlinePlugin/test/fixtures/project/apps/frontend/config/app.yml
===================================================================
--- 
plugins/sfUserOnlinePlugin/test/fixtures/project/apps/frontend/config/app.yml   
                            (rev 0)
+++ 
plugins/sfUserOnlinePlugin/test/fixtures/project/apps/frontend/config/app.yml   
    2010-03-16 17:30:26 UTC (rev 28568)
@@ -0,0 +1,5 @@
+# You can find more information about this file on the symfony website:
+# http://www.symfony-project.org/reference/1_4/en/11-App
+
+# default values
+#all:

Added: 
plugins/sfUserOnlinePlugin/test/fixtures/project/apps/frontend/config/cache.yml
===================================================================
--- 
plugins/sfUserOnlinePlugin/test/fixtures/project/apps/frontend/config/cache.yml 
                            (rev 0)
+++ 
plugins/sfUserOnlinePlugin/test/fixtures/project/apps/frontend/config/cache.yml 
    2010-03-16 17:30:26 UTC (rev 28568)
@@ -0,0 +1,7 @@
+# You can find more information about this file on the symfony website:
+# http://www.symfony-project.org/reference/1_4/en/09-Cache
+
+default:
+  enabled:     false
+  with_layout: false
+  lifetime:    86400

Added: 
plugins/sfUserOnlinePlugin/test/fixtures/project/apps/frontend/config/factories.yml
===================================================================
--- 
plugins/sfUserOnlinePlugin/test/fixtures/project/apps/frontend/config/factories.yml
                         (rev 0)
+++ 
plugins/sfUserOnlinePlugin/test/fixtures/project/apps/frontend/config/factories.yml
 2010-03-16 17:30:26 UTC (rev 28568)
@@ -0,0 +1,42 @@
+# You can find more information about this file on the symfony website:
+# http://www.symfony-project.org/reference/1_4/en/05-Factories
+
+prod:
+  logger:
+    class:   sfNoLogger
+    param:
+      level:   err
+      loggers: ~
+
+test:
+  storage:
+    class: sfSessionTestStorage
+    param:
+      session_path: %SF_TEST_CACHE_DIR%/sessions
+
+  response:
+    class: sfWebResponse
+    param:
+      send_http_headers: false
+
+  mailer:
+    param:
+      delivery_strategy: none
+
+dev:
+  mailer:
+    param:
+      delivery_strategy: none
+
+all:
+  routing:
+    class: sfPatternRouting
+    param:
+      generate_shortest_url:            true
+      extra_parameters_as_query_string: true
+
+  view_cache_manager:
+    class: sfViewCacheManager
+    param:
+      cache_key_use_vary_headers: true
+      cache_key_use_host_name:    true

Added: 
plugins/sfUserOnlinePlugin/test/fixtures/project/apps/frontend/config/filters.yml
===================================================================
--- 
plugins/sfUserOnlinePlugin/test/fixtures/project/apps/frontend/config/filters.yml
                           (rev 0)
+++ 
plugins/sfUserOnlinePlugin/test/fixtures/project/apps/frontend/config/filters.yml
   2010-03-16 17:30:26 UTC (rev 28568)
@@ -0,0 +1,10 @@
+# You can find more information about this file on the symfony website:
+# http://www.symfony-project.org/reference/1_4/en/12-Filters
+
+rendering: ~
+security:  ~
+
+# insert your own filters here
+
+cache:     ~
+execution: ~

Added: 
plugins/sfUserOnlinePlugin/test/fixtures/project/apps/frontend/config/frontendConfiguration.class.php
===================================================================
--- 
plugins/sfUserOnlinePlugin/test/fixtures/project/apps/frontend/config/frontendConfiguration.class.php
                               (rev 0)
+++ 
plugins/sfUserOnlinePlugin/test/fixtures/project/apps/frontend/config/frontendConfiguration.class.php
       2010-03-16 17:30:26 UTC (rev 28568)
@@ -0,0 +1,8 @@
+<?php
+
+class frontendConfiguration extends sfApplicationConfiguration
+{
+  public function configure()
+  {
+  }
+}

Added: 
plugins/sfUserOnlinePlugin/test/fixtures/project/apps/frontend/config/routing.yml
===================================================================
--- 
plugins/sfUserOnlinePlugin/test/fixtures/project/apps/frontend/config/routing.yml
                           (rev 0)
+++ 
plugins/sfUserOnlinePlugin/test/fixtures/project/apps/frontend/config/routing.yml
   2010-03-16 17:30:26 UTC (rev 28568)
@@ -0,0 +1,16 @@
+# You can find more information about this file on the symfony website:
+# http://www.symfony-project.org/reference/1_4/en/10-Routing
+
+# default rules
+homepage:
+  url:   /
+  param: { module: default, action: index }
+
+# generic rules
+# please, remove them by adding more specific rules
+default_index:
+  url:   /:module
+  param: { action: index }
+
+default:
+  url:   /:module/:action/*

Added: 
plugins/sfUserOnlinePlugin/test/fixtures/project/apps/frontend/config/security.yml
===================================================================
--- 
plugins/sfUserOnlinePlugin/test/fixtures/project/apps/frontend/config/security.yml
                          (rev 0)
+++ 
plugins/sfUserOnlinePlugin/test/fixtures/project/apps/frontend/config/security.yml
  2010-03-16 17:30:26 UTC (rev 28568)
@@ -0,0 +1,5 @@
+# You can find more information about this file on the symfony website:
+# http://www.symfony-project.org/reference/1_4/en/08-Security
+
+default:
+  is_secure: false

Added: 
plugins/sfUserOnlinePlugin/test/fixtures/project/apps/frontend/config/settings.yml
===================================================================
--- 
plugins/sfUserOnlinePlugin/test/fixtures/project/apps/frontend/config/settings.yml
                          (rev 0)
+++ 
plugins/sfUserOnlinePlugin/test/fixtures/project/apps/frontend/config/settings.yml
  2010-03-16 17:30:26 UTC (rev 28568)
@@ -0,0 +1,35 @@
+# You can find more information about this file on the symfony website:
+# http://www.symfony-project.org/reference/1_4/en/04-Settings
+
+prod:
+  .settings:
+    no_script_name:         off
+    logging_enabled:        false
+
+dev:
+  .settings:
+    error_reporting:        <?php echo (E_ALL | E_STRICT)."\n" ?>
+    web_debug:              true
+    cache:                  false
+    no_script_name:         false
+    etag:                   false
+
+test:
+  .settings:
+    error_reporting:        <?php echo ((E_ALL | E_STRICT) ^ E_NOTICE)."\n" ?>
+    cache:                  false
+    web_debug:              false
+    no_script_name:         false
+    etag:                   false
+
+all:
+  .settings:
+    # Form security secret (CSRF protection)
+    csrf_secret:            sfUserOnlinePlugin
+
+    # Output escaping settings
+    escaping_strategy:      on
+    escaping_method:        ESC_SPECIALCHARS
+
+    # Enable the database manager
+    use_database:           ##USE_DATABASE##

Added: 
plugins/sfUserOnlinePlugin/test/fixtures/project/apps/frontend/config/view.yml
===================================================================
--- 
plugins/sfUserOnlinePlugin/test/fixtures/project/apps/frontend/config/view.yml  
                            (rev 0)
+++ 
plugins/sfUserOnlinePlugin/test/fixtures/project/apps/frontend/config/view.yml  
    2010-03-16 17:30:26 UTC (rev 28568)
@@ -0,0 +1,20 @@
+# You can find more information about this file on the symfony website:
+# http://www.symfony-project.org/reference/1_4/en/13-View
+
+default:
+  http_metas:
+    content-type: text/html
+
+  metas:
+    #title:        symfony project
+    #description:  symfony project
+    #keywords:     symfony, project
+    #language:     en
+    #robots:       index, follow
+
+  stylesheets:    [main.css]
+
+  javascripts:    []
+
+  has_layout:     true
+  layout:         layout

Added: 
plugins/sfUserOnlinePlugin/test/fixtures/project/apps/frontend/lib/myUser.class.php
===================================================================
--- 
plugins/sfUserOnlinePlugin/test/fixtures/project/apps/frontend/lib/myUser.class.php
                         (rev 0)
+++ 
plugins/sfUserOnlinePlugin/test/fixtures/project/apps/frontend/lib/myUser.class.php
 2010-03-16 17:30:26 UTC (rev 28568)
@@ -0,0 +1,5 @@
+<?php
+
+class myUser extends sfBasicSecurityUser
+{
+}

Added: 
plugins/sfUserOnlinePlugin/test/fixtures/project/apps/frontend/templates/layout.php
===================================================================
--- 
plugins/sfUserOnlinePlugin/test/fixtures/project/apps/frontend/templates/layout.php
                         (rev 0)
+++ 
plugins/sfUserOnlinePlugin/test/fixtures/project/apps/frontend/templates/layout.php
 2010-03-16 17:30:26 UTC (rev 28568)
@@ -0,0 +1,14 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
+<html xmlns="http://www.w3.org/1999/xhtml"; xml:lang="en" lang="en">
+  <head>
+    <?php include_http_metas() ?>
+    <?php include_metas() ?>
+    <?php include_title() ?>
+    <link rel="shortcut icon" href="/favicon.ico" />
+    <?php include_stylesheets() ?>
+    <?php include_javascripts() ?>
+  </head>
+  <body>
+    <?php echo $sf_content ?>
+  </body>
+</html>

Added: 
plugins/sfUserOnlinePlugin/test/fixtures/project/config/ProjectConfiguration.class.php
===================================================================
--- 
plugins/sfUserOnlinePlugin/test/fixtures/project/config/ProjectConfiguration.class.php
                              (rev 0)
+++ 
plugins/sfUserOnlinePlugin/test/fixtures/project/config/ProjectConfiguration.class.php
      2010-03-16 17:30:26 UTC (rev 28568)
@@ -0,0 +1,18 @@
+<?php
+
+if (!isset($_SERVER['SYMFONY']))
+{
+  throw new RuntimeException('Could not find symfony core libraries.');
+}
+
+require_once $_SERVER['SYMFONY'].'/autoload/sfCoreAutoload.class.php';
+sfCoreAutoload::register();
+
+class ProjectConfiguration extends sfProjectConfiguration
+{
+  public function setup()
+  {
+    $this->setPlugins(array('sfUserOnlinePlugin'));
+    $this->setPluginPath('sfUserOnlinePlugin', 
dirname(__FILE__).'/../../../..');
+  }
+}

Added: plugins/sfUserOnlinePlugin/test/fixtures/project/config/properties.ini
===================================================================
--- plugins/sfUserOnlinePlugin/test/fixtures/project/config/properties.ini      
                        (rev 0)
+++ plugins/sfUserOnlinePlugin/test/fixtures/project/config/properties.ini      
2010-03-16 17:30:26 UTC (rev 28568)
@@ -0,0 +1,4 @@
+[symfony]
+  name=##PROJECT_NAME##
+  author=##AUTHOR_NAME##
+  orm=##ORM##

Added: plugins/sfUserOnlinePlugin/test/fixtures/project/config/rsync_exclude.txt
===================================================================
--- plugins/sfUserOnlinePlugin/test/fixtures/project/config/rsync_exclude.txt   
                        (rev 0)
+++ plugins/sfUserOnlinePlugin/test/fixtures/project/config/rsync_exclude.txt   
2010-03-16 17:30:26 UTC (rev 28568)
@@ -0,0 +1,15 @@
+# Project files
+/cache/*
+/log/*
+/web/*_dev.php
+/web/uploads/*
+
+# SCM files
+.arch-params
+.bzr
+_darcs
+.git
+.hg
+.monotone
+.svn
+CVS

Added: 
plugins/sfUserOnlinePlugin/test/fixtures/project/data/fixtures/fixtures.yml
===================================================================
--- plugins/sfUserOnlinePlugin/test/fixtures/project/data/fixtures/fixtures.yml 
                        (rev 0)
+++ plugins/sfUserOnlinePlugin/test/fixtures/project/data/fixtures/fixtures.yml 
2010-03-16 17:30:26 UTC (rev 28568)
@@ -0,0 +1,17 @@
+# # Populate this file with data to be loaded by your ORM's *:data-load task.
+# # You can create multiple files in this directory (i.e. 010_users.yml,
+# # 020_articles.yml, etc) which will be loaded in alphabetical order.
+# # 
+# # See documentation for your ORM's *:data-load task for more information.
+# 
+# User:
+#   fabien:
+#     username: fabien
+#     password: changeme
+#     name:     Fabien Potencier
+#     email:    [email protected]
+#   kris:
+#     username: Kris.Wallsmith
+#     password: changeme
+#     name:     Kris Wallsmith
+#     email:    [email protected]

Added: 
plugins/sfUserOnlinePlugin/test/fixtures/project/lib/form/BaseForm.class.php
===================================================================
--- 
plugins/sfUserOnlinePlugin/test/fixtures/project/lib/form/BaseForm.class.php    
                            (rev 0)
+++ 
plugins/sfUserOnlinePlugin/test/fixtures/project/lib/form/BaseForm.class.php    
    2010-03-16 17:30:26 UTC (rev 28568)
@@ -0,0 +1,13 @@
+<?php
+
+/**
+ * Base project form.
+ * 
+ * @package    ##PROJECT_NAME##
+ * @subpackage form
+ * @author     ##AUTHOR_NAME## 
+ * @version    SVN: $Id: BaseForm.class.php 20147 2009-07-13 11:46:57Z 
FabianLange $
+ */
+class BaseForm extends sfFormSymfony
+{
+}

Added: plugins/sfUserOnlinePlugin/test/fixtures/project/symfony
===================================================================
--- plugins/sfUserOnlinePlugin/test/fixtures/project/symfony                    
        (rev 0)
+++ plugins/sfUserOnlinePlugin/test/fixtures/project/symfony    2010-03-16 
17:30:26 UTC (rev 28568)
@@ -0,0 +1,14 @@
+#!/usr/bin/env php
+<?php
+
+/*
+ * This file is part of the symfony package.
+ * (c) Fabien Potencier <[email protected]>
+ * 
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+chdir(dirname(__FILE__));
+require_once(dirname(__FILE__).'/config/ProjectConfiguration.class.php');
+include(sfCoreAutoload::getInstance()->getBaseDir().'/command/cli.php');

Added: 
plugins/sfUserOnlinePlugin/test/fixtures/project/test/bootstrap/functional.php
===================================================================
--- 
plugins/sfUserOnlinePlugin/test/fixtures/project/test/bootstrap/functional.php  
                            (rev 0)
+++ 
plugins/sfUserOnlinePlugin/test/fixtures/project/test/bootstrap/functional.php  
    2010-03-16 17:30:26 UTC (rev 28568)
@@ -0,0 +1,26 @@
+<?php
+
+/*
+ * This file is part of the symfony package.
+ * (c) 2004-2006 Fabien Potencier <[email protected]>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+// guess current application
+if (!isset($app))
+{
+  $traces = debug_backtrace();
+  $caller = $traces[0];
+
+  $dirPieces = explode(DIRECTORY_SEPARATOR, dirname($caller['file']));
+  $app = array_pop($dirPieces);
+}
+
+require_once dirname(__FILE__).'/../../config/ProjectConfiguration.class.php';
+$configuration = ProjectConfiguration::getApplicationConfiguration($app, 
'test', isset($debug) ? $debug : true);
+sfContext::createInstance($configuration);
+
+// remove all cache
+sfToolkit::clearDirectory(sfConfig::get('sf_app_cache_dir'));

Added: plugins/sfUserOnlinePlugin/test/fixtures/project/test/bootstrap/unit.php
===================================================================
--- plugins/sfUserOnlinePlugin/test/fixtures/project/test/bootstrap/unit.php    
                        (rev 0)
+++ plugins/sfUserOnlinePlugin/test/fixtures/project/test/bootstrap/unit.php    
2010-03-16 17:30:26 UTC (rev 28568)
@@ -0,0 +1,26 @@
+<?php
+
+/*
+ * This file is part of the symfony package.
+ * (c) Fabien Potencier <[email protected]>
+ * 
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+$_test_dir = realpath(dirname(__FILE__).'/..');
+
+// configuration
+require_once dirname(__FILE__).'/../../config/ProjectConfiguration.class.php';
+$configuration = ProjectConfiguration::hasActive() ? 
ProjectConfiguration::getActive() : new 
ProjectConfiguration(realpath($_test_dir.'/..'));
+
+// autoloader
+$autoload = 
sfSimpleAutoload::getInstance(sfConfig::get('sf_cache_dir').'/project_autoload.cache');
+$autoload->loadConfiguration(sfFinder::type('file')->name('autoload.yml')->in(array(
+  sfConfig::get('sf_symfony_lib_dir').'/config/config',
+  sfConfig::get('sf_config_dir'),
+)));
+$autoload->register();
+
+// lime
+include $configuration->getSymfonyLibDir().'/vendor/lime/lime.php';

Added: plugins/sfUserOnlinePlugin/test/fixtures/project/web/.htaccess
===================================================================
--- plugins/sfUserOnlinePlugin/test/fixtures/project/web/.htaccess              
                (rev 0)
+++ plugins/sfUserOnlinePlugin/test/fixtures/project/web/.htaccess      
2010-03-16 17:30:26 UTC (rev 28568)
@@ -0,0 +1,22 @@
+Options +FollowSymLinks +ExecCGI
+
+<IfModule mod_rewrite.c>
+  RewriteEngine On
+
+  # uncomment the following line, if you are having trouble
+  # getting no_script_name to work
+  #RewriteBase /
+
+  # we skip all files with .something
+  #RewriteCond %{REQUEST_URI} \..+$
+  #RewriteCond %{REQUEST_URI} !\.html$
+  #RewriteRule .* - [L]
+
+  # we check if the .html version is here (caching)
+  RewriteRule ^$ index.html [QSA]
+  RewriteRule ^([^.]+)$ $1.html [QSA]
+  RewriteCond %{REQUEST_FILENAME} !-f
+
+  # no, so we redirect to our front web controller
+  RewriteRule ^(.*)$ index.php [QSA,L]
+</IfModule>

Added: plugins/sfUserOnlinePlugin/test/fixtures/project/web/robots.txt
===================================================================
--- plugins/sfUserOnlinePlugin/test/fixtures/project/web/robots.txt             
                (rev 0)
+++ plugins/sfUserOnlinePlugin/test/fixtures/project/web/robots.txt     
2010-03-16 17:30:26 UTC (rev 28568)
@@ -0,0 +1,2 @@
+#User-agent: *
+#Disallow:

-- 
You received this message because you are subscribed to the Google Groups 
"symfony SVN" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/symfony-svn?hl=en.

Reply via email to