phpDocumentor pivotx
[ class tree: pivotx ] [ index: pivotx ] [ all elements ]

Class: EntriesSql

Source Location: /modules/entries_sql.php

Class EntriesSql

Property Summary
static mixed   $shadow_columns  
mixed   $categoriestable  
mixed   $commentstable  
mixed   $date_index  
mixed   $entriestable  
mixed   $entry  
mixed   $entry_index  
mixed   $entry_index_filename  
mixed   $logname  
mixed   $pointer  
mixed   $tagstable  
mixed   $trackbackstable  
mixed   $updated  
mixed   $update_mode  
mixed   $weblog  

[ Top ]
Method Summary
EntriesSql   EntriesSql()  
void   allow_write()  
void   checkTimedPublish()   Checks if any entries set to 'timed publish' should be published.
void   delete_comment()   Deletes the comment with the given comment ID (uid), updates the comment count for the associated entry and clears the related cache items.
void   delete_entries()   Delete one or more entries
void   delete_entry()  
void   delete_trackback()   Deletes the trackback with the given trackback ID (uid), updates the trackback count for the associated entry and clears the related cache items.
void   depublish_entries()   Set one or more entries to 'hold'
void   disallow_write()  
boolean   entry_exists()   Tells if the entry exists - mysql implementation.
void   generate_index()   rebuild the index of the Mysql Database. just here for compatibility.
array   getArchiveArray()   Gets an array of archives - mysql implementation.
array   getEntryInAllLanguages()   Get a single entry in all languages by its uid
integer   getUidEntryShadow()   Return the UID of the shadow entry for a specific entry uid and language
array   get_comment()   Returns a comment from the current entry.
string   get_date()   Gets the date for an entry
int   get_entries_count()   Gets the number of entries
array   get_entry_by_uri()   Tries to get an entry by its (complete) URI.
int   get_next_code()   Gets the code of the next entry - mysql implementation.
int   get_previous_code()   Gets the code of the previous entry - mysql implementation.
array   get_trackback()   Returns a trackback from the current entry.
array   guess_entry()   Tries to guess an entry by it's (incomplete) URI and date (if necessary). The entry is returned as an associative array.
boolean   need_index()   Checks whether the current DB model needs to keep a separate index.
void   publish_entries()   Set one or more entries to 'publish'
boolean   readEntryShadow()   Read shadow columns for a specific uid and language
array   read_admin_entries()   Read a bunch of entries in the admin interface
array   read_entries()   Read a bunch of entries
array   read_entries_count()   Count the number of entries that will be read
array   read_entry()   Retrieves a full entry as an associative array, and returns it. The $code parameter can be a code/uid or an URI. The optional $date parameter helps to narrow it down, if there's more than one option.
array   read_lasttrackbacks()   Read the last trackbacks
array   read_latestcomments()   Read the latest comments
void   safestring()  
void   sanitizePostedEntry()   Sanitize pivotx back save
void   saveEntryInAllLanguages()   Save an entry in all languages
boolean   save_entry()   Saves the current entry - mysql implementation.
array   set_entry()   Sets the current entry to the contents of $entry - mysql implementation.
array   __read_entries()   Read a bunch of entries

[ Top ]
Properties
static mixed   $shadow_columns = array ( 'title','uri','subtitle','introduction','body','convert_lb','extra_search_text' ) [line 27]
API Tags:
Access:  protected


[ Top ]
mixed   $categoriestable [line 54]

[ Top ]
mixed   $commentstable [line 51]

[ Top ]
mixed   $date_index [line 36]

[ Top ]
mixed   $entriestable [line 50]

[ Top ]
mixed   $entry [line 33]

[ Top ]
mixed   $entry_index [line 42]

[ Top ]
mixed   $entry_index_filename [line 43]

[ Top ]
mixed   $logname [line 30]

[ Top ]
mixed   $pointer [line 46]

[ Top ]
mixed   $tagstable [line 53]

[ Top ]
mixed   $trackbackstable [line 52]

[ Top ]
mixed   $updated [line 41]

[ Top ]
mixed   $update_mode [line 40]

[ Top ]
mixed   $weblog [line 49]

[ Top ]
Methods
Constructor EntriesSql  [line 59]

  EntriesSql EntriesSql( [ $loadindex = TRUE], [ $allow_write = TRUE]  )

Parameters:
   $loadindex: 
   $allow_write: 


[ Top ]
allow_write  [line 233]

  void allow_write( )



[ Top ]
checkTimedPublish  [line 1785]

  void checkTimedPublish( )

Checks if any entries set to 'timed publish' should be published.



[ Top ]
delete_comment  [line 1802]

  void delete_comment( int $uid  )

Deletes the comment with the given comment ID (uid), updates the comment count for the associated entry and clears the related cache items.

Parameters:
int   $uid: 


[ Top ]
delete_entries  [line 1698]

  void delete_entries( array $ids  )

Delete one or more entries

Parameters:
array   $ids: 


[ Top ]
delete_entry  [line 1673]

  void delete_entry( )



[ Top ]
delete_trackback  [line 1844]

  void delete_trackback( int $uid  )

Deletes the trackback with the given trackback ID (uid), updates the trackback count for the associated entry and clears the related cache items.

Parameters:
int   $uid: 


[ Top ]
depublish_entries  [line 1757]

  void depublish_entries( array $ids  )

Set one or more entries to 'hold'

Parameters:
array   $ids: 


[ Top ]
disallow_write  [line 228]

  void disallow_write( )



[ Top ]
entry_exists  [line 357]

  boolean entry_exists( $uid, int $code  )

Tells if the entry exists - mysql implementation.

Parameters:
int   $code:  The code/id of the entry.
   $uid: 


[ Top ]
generate_index  [line 345]

  void generate_index( )

rebuild the index of the Mysql Database. just here for compatibility.



[ Top ]
getArchiveArray  [line 172]

  array getArchiveArray( [boolean $force = FALSE], string $unit  )

Gets an array of archives - mysql implementation.

In contrast to the flat file implementation, the file "db/ser-archives.php" isn't used.

Parameters:
boolean   $force:  ignored, only used by flat file implementation.
string   $unit:  the unit of the archives.


[ Top ]
getEntryInAllLanguages  [line 691]

  array getEntryInAllLanguages( integer $uid  )

Get a single entry in all languages by its uid

Parameters:
integer   $uid: 


[ Top ]
getUidEntryShadow  [line 395]

  integer getUidEntryShadow( $uid, $language  )

Return the UID of the shadow entry for a specific entry uid and language

Parameters:
   $uid: 
   $language: 

API Tags:
Return:  return -1 if there is no shadow entry or uid if there is
Access:  protected


[ Top ]
get_comment  [line 1828]

  array get_comment( int $uid  )

Returns a comment from the current entry.

Parameters:
int   $uid: 


[ Top ]
get_date  [line 380]

  string get_date( int $code  )

Gets the date for an entry

Parameters:
int   $code: 


[ Top ]
get_entries_count  [line 243]

  int get_entries_count( [array $params = false]  )

Gets the number of entries

Parameters:
array   $params: 


[ Top ]
get_entry_by_uri  [line 768]

  array get_entry_by_uri( string $uri, [ $language = false]  )

Tries to get an entry by its (complete) URI.

The entry is returned as an associative array.

Parameters:
string   $uri: 
   $language: 


[ Top ]
get_next_code  [line 263]

  int get_next_code( int $num, [ $category = ""]  )

Gets the code of the next entry - mysql implementation.

Parameters:
int   $num: 
   $category: 


[ Top ]
get_previous_code  [line 299]

  int get_previous_code( int $num, [ $category = ""]  )

Gets the code of the previous entry - mysql implementation.

Parameters:
int   $num: 
   $category: 


[ Top ]
get_trackback  [line 1865]

  array get_trackback( int $uid  )

Returns a trackback from the current entry.

Parameters:
int   $uid: 


[ Top ]
guess_entry  [line 725]

  array guess_entry( string $uri, string $date  )

Tries to guess an entry by it's (incomplete) URI and date (if necessary). The entry is returned as an associative array.

Parameters:
string   $uri: 
string   $date: 


[ Top ]
need_index  [line 335]

  boolean need_index( )

Checks whether the current DB model needs to keep a separate index.

The flat file model does, but Mysql doesn't..



[ Top ]
publish_entries  [line 1727]

  void publish_entries( array $ids  )

Set one or more entries to 'publish'

Parameters:
array   $ids: 


[ Top ]
readEntryShadow  [line 427]

  boolean readEntryShadow( $entry_uid, array &$entry, string $language, integer $uid  )

Read shadow columns for a specific uid and language

Parameters:
integer   $uid:  entry uid
array   &$entry:  entry assoc. array
string   $language:  language to read
   $entry_uid: 

API Tags:
Return:  true if shadow data available
Access:  protected


[ Top ]
read_admin_entries  [line 1150]

  array read_admin_entries( array $params, [ $language = false]  )

Read a bunch of entries in the admin interface

Parameters:
array   $params: 
   $language: 


[ Top ]
read_entries  [line 1140]

  array read_entries( array $params, [ $language = false]  )

Read a bunch of entries

Parameters:
array   $params: 
   $language: 


[ Top ]
read_entries_count  [line 823]

  array read_entries_count( [array $params = false]  )

Count the number of entries that will be read

Parameters:
array   $params: 


[ Top ]
read_entry  [line 465]

  array read_entry( mixed $code, [string $date = ""], [string $language = false], [ $keep_extrafields = false]  )

Retrieves a full entry as an associative array, and returns it. The $code parameter can be a code/uid or an URI. The optional $date parameter helps to narrow it down, if there's more than one option.

Parameters:
mixed   $code: 
string   $date: 
string   $language: 
   $keep_extrafields: 


[ Top ]
read_lasttrackbacks  [line 1206]

  array read_lasttrackbacks( array $params  )

Read the last trackbacks

Parameters:
array   $params: 


[ Top ]
read_latestcomments  [line 1160]

  array read_latestcomments( array $params  )

Read the latest comments

Parameters:
array   $params: 


[ Top ]
safestring  [line 1883]

  void safestring( $name  )

Parameters:
   $name: 


[ Top ]
sanitizePostedEntry  [line 1651]

  void sanitizePostedEntry( array &$entry  )

Sanitize pivotx back save

Parameters:
array   &$entry:  entry to save values in


[ Top ]
saveEntryInAllLanguages  [line 1613]

  void saveEntryInAllLanguages( [boolean $update_index = true]  )

Save an entry in all languages

Parameters:
boolean   $update_index: 


[ Top ]
save_entry  [line 1278]

  boolean save_entry( [boolean $update_index = TRUE], [ $language = false]  )

Saves the current entry - mysql implementation.

Returns true if successfully saved. Current implementation seems to return true no matter what...

Parameters:
boolean   $update_index:  Whether to update the date index.
   $language: 


[ Top ]
set_entry  [line 1256]

  array set_entry( array $entry  )

Sets the current entry to the contents of $entry - mysql implementation.

Returns the inserted entry as it got stored in the database with correct code/id.

Parameters:
array   $entry:  The entry to be inserted


[ Top ]
__read_entries  [line 843]

  array __read_entries( array $params, [mixed $language = false], [boolean $admin = false]  )

Read a bunch of entries

Parameters:
array   $params: 
mixed   $language:  (false for default)
boolean   $admin:  (read entries for admin interface)


[ Top ]

Documentation generated on Thu, 17 May 2012 01:07:09 +0200 by phpDocumentor 1.4.3