Changeset 8381
- Timestamp:
- 04/10/08 07:36:13 (5 years ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
plugins/sfDoctrinePollPlugin/branches/1.0/README
r8324 r8381 18 18 Currently user identification is determined by a static method in the PluginsfPoll model. 19 19 You may change the way users are identified by overriding the method getUserIdentifier() 20 Currently it is a concatentation of the users IP Address and the USER_AGENT 20 21 21 22 … … 23 24 === API === 24 25 25 The API is mainly available from the {{{./lib/model/sfPoll.php}}} class object,26 phpdoc is quite exhaustive.27 26 28 27 === Modules === … … 38 37 }}} 39 38 40 In back office, you should activate the sf PollsAdminmodule :39 In back office, you should activate the sf_poll module : 41 40 42 41 {{{ 43 42 .settings 44 enabled_modules: [default, ..., sf PollsAdmin]43 enabled_modules: [default, ..., sf_poll] 45 44 }}} 46 45 == TODO == plugins/sfDoctrinePollPlugin/branches/1.0/lib/model/doctrine/PluginsfPoll.class.php
r8314 r8381 6 6 abstract class PluginsfPoll extends BasesfPoll 7 7 { 8 9 10 11 8 } plugins/sfDoctrinePollPlugin/branches/1.0/lib/model/doctrine/PluginsfPollTable.class.php
r8314 r8381 22 22 ->execute(array(), Doctrine::FETCH_ARRAY); 23 23 } 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 } 24 50 25 51 }