Koowa_Filter
[ class tree: Koowa_Filter ] [ index: Koowa_Filter ] [ all elements ]

Class: KFilterSlug

Source Location: /libraries/koowa/filter/slug.php

Class Overview

KObject
   |
   --KFilterAbstract
      |
      --KFilterSlug

Slug filter


Author(s):

Variables

Methods


Inherited Variables

Inherited Methods

Class: KFilterAbstract

KFilterAbstract::__construct()
Constructor
KFilterAbstract::addFilter()
Add a filter based on priority
KFilterAbstract::execute()
Command handler
KFilterAbstract::getHandle()
Get a handle for this object
KFilterAbstract::getInstance()
Force creation of a singleton
KFilterAbstract::getPriority()
Get the priority of the filter
KFilterAbstract::sanitize()
Sanitize a variable or data collection
KFilterAbstract::validate()
Validate a variable or data collection
KFilterAbstract::_sanitize()
Sanitize a variable only
KFilterAbstract::_validate()
Validate a variable

Class: KObject

KObject::__construct()
Constructor
KObject::get()
Get the object properties
KObject::getHandle()
Get a handle for this object
KObject::getIdentifier()
Gets the service identifier.
KObject::getMethods()
Get a list of all the available methods
KObject::getService()
Get an instance of a class based on a class identifier only creating it if it does not exist yet.
KObject::inherits()
Checks if the object or one of it's mixin's inherits from a class.
KObject::mixin()
Mixin an object
KObject::set()
Set the object properties
KObject::_initialize()
Initializes the options for the object
KObject::__call()
Search the mixin method map and call the method or trigger an error
KObject::__clone()
Preform a deep clone of the object.

Class Details

[line 17]
Slug filter



Tags:

author:  Johan Janssens <johan@nooku.org>


[ Top ]


Class Variables

$_length =

[line 33]

Maximum length the generated slug can have. If this is null the length of the slug column will be used.



Tags:

access:  protected

Type:   integer


[ Top ]

$_separator =

[line 25]

Separator character / string to use for replacing non alphabetic characters in generated slug



Tags:

access:  protected

Type:   string


[ Top ]



Class Methods


constructor __construct [line 40]

KFilterSlug __construct( $config)

Constructor



Tags:

access:  public


Overrides KFilterAbstract::__construct() (Constructor)

Parameters:

object An   $config   optional KConfig object with configuration options

[ Top ]

method _initialize [line 56]

void _initialize( $config)

Initializes the options for the object

Called from __construct() as a first step of object instantiation.




Tags:

access:  protected


Overrides KObject::_initialize() (Initializes the options for the object)

Parameters:

object An   $config   optional KConfig object with configuration options

[ Top ]

method _sanitize [line 89]

scalar _sanitize( scalar $value)

Sanitize a value

Replace all accented UTF-8 characters by unaccented ASCII-7 "equivalents", replace whitespaces by hyphens and lowercase the result.




Tags:

access:  protected


Overrides KFilterAbstract::_sanitize() (Sanitize a variable only)

Parameters:

scalar   $value   Variable to be sanitized

[ Top ]

method _validate [line 75]

bool _validate( mixed $value)

Validate a value

Returns true if the string only contains US-ASCII and does not contain any spaces




Tags:

return:  True when the variable is valid
access:  protected


Overrides KFilterAbstract::_validate() (Validate a variable)

Parameters:

mixed   $value   Variable to be validated

[ Top ]


Documentation generated on Thu, 23 May 2013 03:03:21 +0200 by phpDocumentor 1.4.3