Alphred
  • Namespace
  • Class
  • Tree
  • Deprecated
  • Todo
  • Download

Namespaces

  • Alphred
  • None

Classes

  • Alfred
  • AppleScript
  • Choose
  • Config
  • Date
  • Dialog
  • Filter
  • Globals
  • i18n
  • Ini
  • Keychain
  • Log
  • Notification
  • Request
  • Result
  • ScriptFilter
  • Text

Interfaces

  • ConfigKeyNotSet
  • Exception
  • FileDoesNotExist
  • InvalidKeychainAccount
  • InvalidScriptFilterArgument
  • InvalidSecurityAction
  • InvalidXMLProperty
  • PasswordExists
  • PasswordNotFound
  • PluginFunctionNotFound
  • RunningOutsideOfAlfred
  • ShouldBeBool
  • TooManyArguments
  • UnknownSecurityException
  • UseOnlyAsStatic

Class Text

Methods to apply "filters" to text to transform them

Right now, this is, well, "special sauce" and not major. So use it with your own precaution. It is possibly, going to change.

Namespace: Alphred
Since: 1.0.0
Todo: Brainstorm what other filters should be written
Located at Text.php

Methods summary

public static string
# title_case( string $string )

Convert a string to Title Case

Convert a string to Title Case

Parameters

$string
string to be converted

Returns

string
the string in Title Case
public static string
# camel_case( string $string )

Converts a string to CamelCase

Converts a string to CamelCase

Parameters

$string
the string to be converted

Returns

string
the string in CamelCase
public static string
# underscore( string $string )

Adds underscores to a string

Adds underscores to a string

Parameters

$string
a string to add underscores to

Returns

string
a string with underscores

Since

1.0.0
public static string
# hyphenate( string $string )

Hyphenates a string

Hyphenates a string

Parameters

$string
the string to hyphenate

Returns

string
a hyphenated string

Since

1.0.0
public static string
# add_commas_to_list( array $list, boolean $suffix = false )

Adds commas to list (uses Oxford Commas, sorry, it's just proper)

Adds commas to list (uses Oxford Commas, sorry, it's just proper)

Parameters

$list
an array to be pushed into a comma-ified string
$suffix
or not there is a suffix

Returns

string
a string with commas

Since

1.0.0

Magic methods summary

Alphred API documentation generated by ApiGen