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

Class: KFilterDate

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

Class Overview

KObject
   |
   --KFilterAbstract
      |
      --KFilterTimestamp
         |
         --KFilterDate

Date 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]
Date filter

Validates or sanitizes a value is an ISO 8601 date string.




Tags:

author:  Johan Janssens <johan@nooku.org>


[ Top ]


Class Methods


method _sanitize [line 50]

string _sanitize( string $value)

Forces the value to an ISO-8601 formatted date ("yyyy-mm-dd").



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 30]

bool _validate( scalar $value)

Validates that a value is an ISO 8601 date string

The format is "yyyy-mm-dd". Also checks to see that the date itself is valid (for example, no Feb 30).




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 Wed, 22 May 2013 03:01:07 +0200 by phpDocumentor 1.4.3