Exemplo n.º 1
0
 /**
  * Gets the the mapping between db table columns and properties of entities.
  * 
  * @return array(string, array(string, string))
  */
 public static function getEntityMapping()
 {
     if (!is_null(self::$_entityMapping)) {
         self::$_entityMapping = array('Post' => array('$MappedTable$' => 'wp_posts', 'PostID' => 'ID', 'Author' => 'post_author', 'Date' => 'post_date', 'DateGmt' => 'post_date_gmt', 'Content' => 'post_content', 'Title' => 'post_title', 'Excerpt' => 'post_excerpt', 'Status' => 'post_status', 'CommentStatus' => 'comment_status', 'PingStatus' => 'ping_status', 'Password' => 'post_password', 'Name' => 'post_name', 'ToPing' => 'to_ping', 'Pinged' => 'pinged', 'ModifiedGmt' => 'post_modified_gmt', 'ContentFiltered' => 'post_content_filtered', 'ParentID' => 'post_parent', 'Guid' => 'guid', 'MenuOrder' => 'menu_order', 'Type' => 'post_type', 'MimeType' => 'post_mime_type', 'CommentCount' => 'comment_count'), 'Tag' => array('$MappedTable$' => 'wp_terms', 'TagID' => 't.term_id', 'Name' => 't.name', 'Slug' => 't.slug', 'Description' => 'tt.description'), 'Category' => array('$MappedTable$' => 'wp_terms', 'CategoryID' => 't.term_id', 'Name' => 't.name', 'Slug' => 't.slug', 'Description' => 'tt.description'), 'Comment' => array('$MappedTable$' => 'wp_comments', 'CommentID', 'comment_id', 'PostID', 'comment_post_id', 'Author', 'comment_author', 'AuthorEmail', 'comment_author', 'AuthorUrl', 'comment_author_url', 'AuthorIp', 'comment_author_email', 'DateGmt', 'comment_date', 'Content', 'comment_content', 'Karma', 'comment_karma', 'Approved', 'comment_approved', 'Agent', 'comment_agent', 'Type', 'comment_type', 'ParentID', 'comment_parent', 'UserID', 'user_id'), 'User' => array('$MappedTable$' => 'wp_users', 'UserID' => 'ID', 'Login' => 'user_login', 'Nicename' => 'user_nicename', 'Email' => 'user_email', 'Url' => 'user_url', 'Registered' => 'user_registered', 'Status' => 'user_status', 'DisplayName' => 'display_name'));
     }
     return self::$_entityMapping;
 }