User_urlshortener_prefs.php

Summary
User_urlshortener_prefs.php
URL Shortener PreferencesClass to hold a user’s URL shortener preferences
User_urlshortener_prefs
schemaDefReturns the table schema for this class
maxUrlLength
maxNoticeLengthReturns the maximum notice length this user can post
urlShorteningServiceReturns the currently-specified urlShorteningService for the user
getPrefsReturns the preferences for the provided users

URL Shortener Preferences

Class to hold a user’s URL shortener preferences

postActiv

the micro-blogging software

Copyright

Copyright © 2016, Maiyannah Bishop

Derived from code copyright various sources

  • GNU Social © 2013-2016, Free Software Foundation, Inc
  • StatusNet © 2008-2012, StatusNet, Inc

License

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License along with this program.  If not, see http://www.gnu.org/licenses/.

https://www.gnu.org/licenses/agpl.html

About

Data class for user URL shortener preferences

PHP version

Tested with PHP 5.6

File Authors

Web

User_urlshortener_prefs

Variables

  • __table
  • user_id
  • urlshorteningservice
  • maxurllength
  • created
  • modified
Summary
schemaDefReturns the table schema for this class
maxUrlLength
maxNoticeLengthReturns the maximum notice length this user can post
urlShorteningServiceReturns the currently-specified urlShorteningService for the user
getPrefsReturns the preferences for the provided users

schemaDef

public static function schemaDef()

Returns the table schema for this class

Returns

  • array

maxUrlLength

static function maxUrlLength($user)

Parameters

  • user - user we’re checking limits for

Returns

  • integer

maxNoticeLength

static function maxNoticeLength($user)

Returns the maximum notice length this user can post

Paramters

  • user - user we’re checking limits for

Returns

  • integer

urlShorteningService

static function urlShorteningService($user)

Returns the currently-specified urlShorteningService for the user

Parameters

useruser to retrieve the service for

Returns

  • string

getPrefs

static function getPrefs($user)

Returns the preferences for the provided users

Parameters

  • user - user to get preferences for

Returns

  • User_urlshortener_prefs object for that user or null if not found
public static function schemaDef()
Returns the table schema for this class
static function maxUrlLength($user)
static function maxNoticeLength($user)
Returns the maximum notice length this user can post
static function urlShorteningService($user)
Returns the currently-specified urlShorteningService for the user
static function getPrefs($user)
Returns the preferences for the provided users