include/Expressions/Expression/Date/TodayExpression.php

Show: inherited
Table of Contents

\TodayExpression

Package: SugarCRM

<b>today()</b><br> Returns a date object representing todays date.

Parent(s)
\DateExpression < \AbstractExpression

Properties

Propertypublic  $BOOLEAN_TYPE= '"boolean"'
Default value"boolean"Details
Type
n/a
Inherited_from
\AbstractExpression::$$BOOLEAN_TYPE  
Inherited_from
\DateExpression::$$BOOLEAN_TYPE  
Propertypublic  $DATE_TYPE= '"date"'
Default value"date"Details
Type
n/a
Inherited_from
\AbstractExpression::$$DATE_TYPE  
Inherited_from
\DateExpression::$$DATE_TYPE  
Propertypublic  $ENUM_TYPE= '"enum"'
Default value"enum"Details
Type
n/a
Inherited_from
\AbstractExpression::$$ENUM_TYPE  
Inherited_from
\DateExpression::$$ENUM_TYPE  
Propertypublic  $FALSE= '"false"'
Default value"false"Details
Type
n/a
Inherited_from
\AbstractExpression::$$FALSE  
Inherited_from
\DateExpression::$$FALSE  
Propertypublic  $GENERIC_TYPE= '"generic"'
Default value"generic"Details
Type
n/a
Inherited_from
\AbstractExpression::$$GENERIC_TYPE  
Inherited_from
\DateExpression::$$GENERIC_TYPE  
Propertypublic  $INFINITY= '-1'
Default value-1Details
Type
n/a
Inherited_from
\AbstractExpression::$$INFINITY  
Inherited_from
\DateExpression::$$INFINITY  
Propertypublic  $NUMERIC_TYPE= '"number"'
Default value"number"Details
Type
n/a
Inherited_from
\AbstractExpression::$$NUMERIC_TYPE  
Inherited_from
\DateExpression::$$NUMERIC_TYPE  
Propertypublic  $RELATE_TYPE= '"relate"'
Default value"relate"Details
Type
n/a
Inherited_from
\AbstractExpression::$$RELATE_TYPE  
Inherited_from
\DateExpression::$$RELATE_TYPE  
Propertypublic  $STRING_TYPE= '"string"'
Default value"string"Details
Type
n/a
Inherited_from
\AbstractExpression::$$STRING_TYPE  
Inherited_from
\DateExpression::$$STRING_TYPE  
Propertypublic  $TIME_TYPE= '"time"'
Default value"time"Details
Type
n/a
Inherited_from
\AbstractExpression::$$TIME_TYPE  
Inherited_from
\DateExpression::$$TIME_TYPE  
Propertypublic  $TRUE= '"true"'
Default value"true"Details
Type
n/a
Inherited_from
\AbstractExpression::$$TRUE  
Inherited_from
\DateExpression::$$TRUE  
Propertypublic  $TYPE_MAP= 'array( "number" => "NumericExpression", "string" => "StringExpression", "date" => "DateExpression", "time" => "TimeExpression", "boolean" => "BooleanExpression", "enum" => "EnumExpression", "relate" => "RelateExpression", "generic" => "AbstractExpression", )'
Default valuearray( "number" => "NumericExpression", "string" => "StringExpression", "date" => "DateExpression", "time" => "TimeExpression", "boolean" => "BooleanExpression", "enum" => "EnumExpression", "relate" => "RelateExpression", "generic" => "AbstractExpression", )Details
Type
n/a
Inherited_from
\AbstractExpression::$$TYPE_MAP  
Inherited_from
\DateExpression::$$TYPE_MAP  
Propertypublic  $params= ''
Details
Type
n/a
Inherited_from
\AbstractExpression::$$params  
Inherited_from
\DateExpression::$$params  

Methods

methodpublicAbstractExpression(  $params = null ) : void
inherited

Constructs an Expression object given the parameters.

Inherited from: \AbstractExpression::AbstractExpression()\DateExpression::AbstractExpression()
Parameters
Name Type Description
$params
methodpublicevaluate( ) : void

The today function is sensitive to the current users timezone since it returns a day without time.

methodpublicgetJSEvaluate( ) : void
static

Returns the JS Equivalent of the evaluate function.

methodpublicgetOperationName( ) : void
static

Returns the opreation name that this Expression should be called by.

methodpublicgetParamCount( ) : void
static

Returns the maximum number of parameters needed.

methodpublicgetParameterTypes( ) : void
staticinherited

All parameters have to be a string.

Inherited from: \DateExpression::getParameterTypes()
methodpublicgetParameters( ) : void
inherited

Returns the parameter list for this Expression.

Inherited from: \AbstractExpression::getParameters()\DateExpression::getParameters()
methodpublicisProperType(  $variable,  $type ) : void
inherited

Enforces the parameter types.

Inherited from: \AbstractExpression::isProperType()\DateExpression::isProperType()
Parameters
Name Type Description
$variable
$type
methodpublicparse( String $date ) : \DateTime,
staticinherited

Inherited from: \DateExpression::parse()
Parameters
Name Type Description
$date String
Returns
Type Description
\DateTime, returns the DateTime object representing the string passed in or false if the string could not be converted to a valid date.
Details
Static
 
methodpublicroundTime( \DateTime $date ) : \DateTime
staticinherited

Inherited from: \DateExpression::roundTime()
Parameters
Name Type Description
$date \DateTime
Returns
Type Description
\DateTime $date rounded to the nearest 15 minute interval.
Details
Static
 
methodpublictoString( ) : void

Returns the String representation of this Expression.

TODO: Make this an abstract method.

methodpublicvalidateParameters( ) : void
inherited

Validates the parameters and throws an Exception if invalid.

Inherited from: \AbstractExpression::validateParameters()\DateExpression::validateParameters()
Documentation was generated by DocBlox 0.18.1.