Index: trunk/extensions/Reviews/includes/ReviewsDBObject.php |
— | — | @@ -576,10 +576,28 @@ |
577 | 577 | ); |
578 | 578 | } |
579 | 579 | |
| 580 | + /** |
| 581 | + * Takes a field name with prefix and returns the unprefixed equivalent. |
| 582 | + * |
| 583 | + * @since 0.1 |
| 584 | + * |
| 585 | + * @param string $fieldName |
| 586 | + * |
| 587 | + * @return string |
| 588 | + */ |
580 | 589 | public static function unprefixFieldName( $fieldName ) { |
581 | 590 | return substr( $fieldName, strlen( static::getFieldPrefix() ) ); |
582 | 591 | } |
583 | 592 | |
| 593 | + /** |
| 594 | + * Takes an array of field names with prefix and returns the unprefixed equivalent. |
| 595 | + * |
| 596 | + * @since 0.1 |
| 597 | + * |
| 598 | + * @param array $fieldNames |
| 599 | + * |
| 600 | + * @return array |
| 601 | + */ |
584 | 602 | public static function unprefixFieldNames( array $fieldNames ) { |
585 | 603 | return array_map( 'static::unprefixFieldName', $fieldNames ); |
586 | 604 | } |