Webylon 3.1 API Docs
  • Package
  • Class
  • Tree
  • Deprecated
  • Download
Version: current
  • 3.2
  • 3.1

Packages

  • auth
  • Booking
  • cart
    • shipping
    • steppedcheckout
  • Catalog
  • cms
    • assets
    • batchaction
    • batchactions
    • bulkloading
    • comments
    • content
    • core
    • export
    • newsletter
    • publishers
    • reports
    • security
    • tasks
  • Dashboard
  • DataObjectManager
  • event
  • faq
  • forms
    • actions
    • core
    • fields-basic
    • fields-dataless
    • fields-datetime
    • fields-files
    • fields-formatted
    • fields-formattedinput
    • fields-relational
    • fields-structural
    • transformations
    • validators
  • googlesitemaps
  • guestbook
  • installer
  • newsletter
  • None
  • photo
    • gallery
  • PHP
  • polls
  • recaptcha
  • sapphire
    • api
    • bulkloading
    • control
    • core
    • cron
    • dev
    • email
    • fields-formattedinput
    • filesystem
    • formatters
    • forms
    • i18n
    • integration
    • misc
    • model
    • parsers
    • search
    • security
    • tasks
    • testing
    • tools
    • validation
    • view
    • widgets
  • seo
    • open
      • graph
  • sfDateTimePlugin
  • spamprotection
  • stealth
    • captha
  • subsites
  • userform
    • pagetypes
  • userforms
  • webylon
  • widgets

Classes

  • ArrayLib
  • BBCodeParser
  • Convert
  • Cookie
  • DataDifferencer
  • Geoip
  • HTMLCleaner
  • HTTP
  • i18n
  • Profiler
  • ShortcodeParser
  • SSHTMLBBCodeParser
  • SSHTMLBBCodeParser_Filter
  • SSHTMLBBCodeParser_Filter_Basic
  • SSHTMLBBCodeParser_Filter_EmailLinks
  • SSHTMLBBCodeParser_Filter_Extended
  • SSHTMLBBCodeParser_Filter_Images
  • SSHTMLBBCodeParser_Filter_Links
  • SSHTMLBBCodeParser_Filter_Lists
  • TextParser
  • Translatable_Transformation
  • XML

Class ArrayLib

Library of static methods for manipulating arrays.

Package: sapphire\misc
Located at sapphire/core/ArrayLib.php

Methods summary

public static array
# invert( array $arr )

Inverses the first and second level keys of an associative array, keying the result by the second level, and combines all first level entries within them.

Inverses the first and second level keys of an associative array, keying the result by the second level, and combines all first level entries within them.

Before: <example> array( 'row1' => array( 'col1' =>'val1', 'col2' => 'val2' ), 'row2' => array( 'col1' => 'val3', 'col2' => 'val4' ) ) </example>

After: <example> array( 'col1' => array( 'row1' => 'val1', 'row2' => 'val3', ), 'col2' => array( 'row1' => 'val2', 'row2' => 'val4', ), ) </example>

Parameters

$arr
array $arr

Returns

array
array
public static array
# valuekey( mixed $arr )

Return an array where the keys are all equal to the values

Return an array where the keys are all equal to the values

Parameters

$arr
$arr array

Returns

array
array
public static
# array_values_recursive( mixed $arr )
public static array
# filter_keys( mixed $arr, mixed $keys )

Filter an array by keys (useful for only allowing certain form-input to be saved).

Filter an array by keys (useful for only allowing certain form-input to be saved).

Parameters

$arr
$arr array
$keys
$keys array

Returns

array
array
public static boolean
# is_associative( array $arr )

Determines if an array is associative by checking for existing keys via array_key_exists().

Determines if an array is associative by checking for existing keys via array_key_exists().

Parameters

$arr
array $arr

Returns

boolean
boolean

See

http://nz.php.net/manual/en/function.is-array.php#76188
public static boolean
# in_array_recursive( mixed $needle, array $haystack, boolean $strict = false )

Recursively searches an array $haystack for the value(s) $needle. Assumes that all values in $needle (if $needle is an array) are at the SAME level, not spread across multiple dimensions of the $haystack.

Recursively searches an array $haystack for the value(s) $needle. Assumes that all values in $needle (if $needle is an array) are at the SAME level, not spread across multiple dimensions of the $haystack.

Parameters

$needle
mixed $needle
$haystack
array $haystack
$strict
boolean $strict

Returns

boolean
boolean

Magic methods summary

[Raise a SilverStripe Framework issue/bug](https://github.com/silverstripe/silverstripe-framework/issues/new)
- [Raise a SilverStripe CMS issue/bug](https://github.com/silverstripe/silverstripe-cms/issues/new)
- Please use the Silverstripe Forums to ask development related questions. -
Webylon 3.1 API Docs API documentation generated by ApiGen 2.8.0