Development

Changeset 8381

You must first sign up to be able to contribute.

Changeset 8381

Show
Ignore:
Timestamp:
04/10/08 07:36:13 (5 years ago)
Author:
Stephen.Ostrow
Message:

Updating the model and README

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • plugins/sfDoctrinePollPlugin/branches/1.0/README

    r8324 r8381  
    1818Currently user identification is determined by a static method  in the PluginsfPoll model. 
    1919You may change the way users are identified by overriding the method getUserIdentifier() 
     20Currently it is a concatentation of the users IP Address and the USER_AGENT 
    2021 
    2122 
     
    2324=== API === 
    2425 
    25 The API is mainly available from the {{{./lib/model/sfPoll.php}}} class object,  
    26 phpdoc is quite exhaustive. 
    2726 
    2827=== Modules === 
     
    3837}}} 
    3938 
    40 In back office, you should activate the sfPollsAdmin module : 
     39In back office, you should activate the sf_poll module : 
    4140 
    4241{{{ 
    4342  .settings 
    44     enabled_modules: [default, ..., sfPollsAdmin
     43    enabled_modules: [default, ..., sf_poll
    4544}}} 
    4645== TODO == 
  • plugins/sfDoctrinePollPlugin/branches/1.0/lib/model/doctrine/PluginsfPoll.class.php

    r8314 r8381  
    66abstract class PluginsfPoll extends BasesfPoll 
    77{ 
    8  
    9  
    10  
    118} 
  • plugins/sfDoctrinePollPlugin/branches/1.0/lib/model/doctrine/PluginsfPollTable.class.php

    r8314 r8381  
    2222        ->execute(array(), Doctrine::FETCH_ARRAY); 
    2323  } 
     24   
     25 
     26  /** 
     27   * Returns a unique string for the current user 
     28   * 
     29   * @return string Unique User Identifier 
     30   */ 
     31  public function getUserIdentifier() 
     32  { 
     33    $unique = ''; 
     34    $unique .= $_SERVER['REMOTE_ADDR']; 
     35    $unique .= $_SERVER["HTTP_USER_AGENT"]; 
     36    return $unique; 
     37  } 
     38   
     39 
     40  /** 
     41   * Returns the current poll 
     42   * 
     43   * @return sfPoll current poll 
     44   */ 
     45  function fetchCurrent() 
     46  { 
     47    return Doctrine_Query::create()->from('Poll') 
     48        ->fetchOne(); 
     49  } 
    2450 
    2551}