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

Class: KFilterTime

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

Class Overview

KObject
   |
   --KFilterAbstract
      |
      --KFilterTimestamp
         |
         --KFilterTime

Time filter


Author(s):

Methods


Inherited Variables

Inherited Methods

Class: KFilterTimestamp

KFilterTimestamp::_arrayToDate()
Converts an array of date parts to a string date.
KFilterTimestamp::_arrayToTime()
Converts an array of time parts to a string time.
KFilterTimestamp::_arrayToTimestamp()
Converts an array of timestamp parts to a string timestamp.
KFilterTimestamp::_sanitize()
Forces the value to an ISO-8601 formatted timestamp using a space separator ("yyyy-mm-dd hh:ii:ss") instead of a "T" separator.
KFilterTimestamp::_validate()
Validates that the value is an ISO 8601 timestamp string.

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 18]
Time filter

Validates or sanitizes a value to an ISO-8601 time




Tags:

author:  Johan Janssens <johan@nooku.org>


[ Top ]


Class Methods


method _sanitize [line 48]

string _sanitize( string $value)

Forces the value to an ISO-8601 formatted time ("hh:ii:ss").



Tags:

return:  The sanitized value
access:  protected


Overrides KFilterTimestamp::_sanitize() (Forces the value to an ISO-8601 formatted timestamp using a space separator ("yyyy-mm-dd hh:ii:ss") instead of a "T" separator.)

Parameters:

string   $value   The value to be sanitized. If an integer, it is used as a Unix timestamp; otherwise, converted to a Unix timestamp using [[php::strtotime() | ]].

[ Top ]

method _validate [line 29]

bool _validate( scalar $value)

Validates that the value is an ISO 8601 time string (hh:ii::ss format).

As an alternative, the value may be an array with all of the keys for `H`, `i`, and optionally `s`, in which case the value is converted to an ISO 8601 string before validating it.




Tags:

return:  True when the variable is valid
access:  protected


Overrides KFilterTimestamp::_validate() (Validates that the value is an ISO 8601 timestamp string.)

Parameters:

scalar   $value   Value to be validated

[ Top ]


Documentation generated on Tue, 18 Jun 2013 03:02:37 +0200 by phpDocumentor 1.4.3