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 Result

Result class

Class object represents an item in the script filter array. The internals of the class check for validity so that only correct methods can be set.

Namespace: Alphred
Since: 1.0.0
See: ScriptFilter::add_result() These items are part of the ScriptFilter
Used by: Alphred\ScriptFilter Result items are stored in the script filter
Located at ScriptFilter.php

Methods summary

public
# __construct( array|string $args )

Creates a Result object

Creates a Result object

Parameters

$args
the title if string; a list of arguments if an array
public
# set( array $options )

Sets a multiple values of a result object

Sets a multiple values of a result object

Parameters

$options
an array of possible options

Throws

Alphred\InvalidScriptFilterArgument
When trying to set an invalid script filter field
public boolean
# __call( string $called, array $arguments )

Magic method to set everything necessary

Magic method to set everything necessary

Parameters

$called
method called
$arguments
array of arguments

Returns

boolean

Throws

Alphred\TooManyArguments
when trying to use multiple values
Alphred\InvalidXMLProperty
when trying to set an invalid XML property

Todo

Convert the 'false' returns to thrown Exceptions

Magic methods summary

public
# set_arg( )

the argument to pass

the argument to pass

public
# set_autocomplete( )

autocomplete text

autocomplete text

public
# set_icon( )

path to icon

path to icon

public
# set_icon_fileicon( )

path to application

path to application

public
# set_icon_filetype( )

filetype for icon

filetype for icon

public
# set_subtitle( )

subtitle text

subtitle text

public
# set_subtitle_alt( )

alt subtitle text

alt subtitle text

public
# set_subtitle_cmd( )

cmd subtitle text

cmd subtitle text

public
# set_subtitle_ctrl( )

ctrl subtitle text

ctrl subtitle text

public
# set_subtitle_fn( )

fn subtitle text

fn subtitle text

public
# set_subtitle_shift( )

shift subtitle text

shift subtitle text

public
# set_text_copy( )

text to pass when copying

text to pass when copying

public
# set_text_largetype( )

text to pass to large type

text to pass to large type

public
# set_title( )

title of result

title of result

public
# set_uid( )

uid for result

uid for result

Properties summary

private static array $string_methods

Possible string methods for a Result

Possible string methods for a Result

# [ 'title', 'icon', 'icon_filetype', 'icon_fileicon', 'subtitle', 'subtitle_shift', 'subtitle_fn', 'subtitle_ctrl', 'subtitle_alt', 'subtitle_cmd', 'uid', 'arg', 'text_copy', 'text_largetype', 'autocomplete' ]
private static array $bool_methods

Possible boolean methods for a Result

Possible boolean methods for a Result

# [ 'valid' ]
Alphred API documentation generated by ApiGen