summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHannes Magnusson <bjori@php.net>2006-09-10 17:01:10 +0000
committerHannes Magnusson <bjori@php.net>2006-09-10 17:01:10 +0000
commit9dceb42867e900127929130e9b78a8c1a4e255ac (patch)
tree5a5f9cfb117dfaf43f75eb7767f53f8d2a374a37
parentf2ad985262ed01eec29d90eab2eb0958089fc8c8 (diff)
downloadphp-git-9dceb42867e900127929130e9b78a8c1a4e255ac.tar.gz
Add protos
-rw-r--r--ext/date/php_date.c58
1 files changed, 56 insertions, 2 deletions
diff --git a/ext/date/php_date.c b/ext/date/php_date.c
index e56406887d..3ecb30fbae 100644
--- a/ext/date/php_date.c
+++ b/ext/date/php_date.c
@@ -1780,6 +1780,8 @@ static void date_initialize(php_date_obj *dateobj, /*const*/ char *time_str, int
timelib_time_dtor(now);
}
+/* {{{ proto DateTime date_create([string time[, DateTimeZone object]])
+*/
PHP_FUNCTION(date_create)
{
zval *timezone_object = NULL;
@@ -1793,7 +1795,10 @@ PHP_FUNCTION(date_create)
date_instantiate(date_ce_date, return_value TSRMLS_CC);
date_initialize(zend_object_store_get_object(return_value TSRMLS_CC), time_str, time_str_len, timezone_object TSRMLS_CC);
}
+/* }}} */
+/* {{{ proto DateTime::__construct([string time[, DateTimeZone object]])
+*/
PHP_METHOD(DateTime, __construct)
{
zval *timezone_object = NULL;
@@ -1806,7 +1811,10 @@ PHP_METHOD(DateTime, __construct)
php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC);
}
}
+/* }}} */
+/* {{{ proto array date_parse(string date)
+*/
PHP_FUNCTION(date_parse)
{
char *date;
@@ -1903,6 +1911,8 @@ PHP_FUNCTION(date_parse)
}
/* }}} */
+/* {{{ proto string date_format(DateTime object, string format)
+*/
PHP_FUNCTION(date_format)
{
zval *object;
@@ -1942,7 +1952,10 @@ PHP_FUNCTION(date_format_locale)
RETURN_STRINGL(str, length, 0);
}
}
+/* }}} */
+/* {{{ proto void date_modify(DateTime object, string modify)
+*/
PHP_FUNCTION(date_modify)
{
zval *object;
@@ -1973,7 +1986,10 @@ PHP_FUNCTION(date_modify)
timelib_update_ts(dateobj->time, NULL);
timelib_update_from_sse(dateobj->time);
}
+/* }}} */
+/* {{{ proto DateTimeZone date_timezone_get(DateTime object)
+*/
PHP_FUNCTION(date_timezone_get)
{
zval *object;
@@ -1993,7 +2009,10 @@ PHP_FUNCTION(date_timezone_get)
RETURN_FALSE;
}
}
+/* }}} */
+/* {{{ proto void date_timezone_set(DateTime object, DateTimeZone object)
+*/
PHP_FUNCTION(date_timezone_set)
{
zval *object;
@@ -2013,7 +2032,10 @@ PHP_FUNCTION(date_timezone_set)
timelib_set_timezone(dateobj->time, timelib_tzinfo_clone(tzobj->tz));
timelib_unixtime2local(dateobj->time, dateobj->time->sse);
}
+/* }}} */
+/* {{{ proto long date_offset_get(DateTime object)
+*/
PHP_FUNCTION(date_offset_get)
{
zval *object;
@@ -2034,7 +2056,10 @@ PHP_FUNCTION(date_offset_get)
RETURN_LONG(0);
}
}
+/* }}} */
+/* {{{ proto void date_time_set(DateTime object, long hour, long minute[, long second])
+*/
PHP_FUNCTION(date_time_set)
{
zval *object;
@@ -2051,7 +2076,10 @@ PHP_FUNCTION(date_time_set)
dateobj->time->s = s;
timelib_update_ts(dateobj->time, NULL);
}
+/* }}} */
+/* {{{ proto void date_date_set(DateTime object, long year, long month, long day)
+*/
PHP_FUNCTION(date_date_set)
{
zval *object;
@@ -2068,7 +2096,10 @@ PHP_FUNCTION(date_date_set)
dateobj->time->d = d;
timelib_update_ts(dateobj->time, NULL);
}
+/* }}} */
+/* {{{ proto void date_isodate_set(DateTime object, long year, long week[, long day])
+*/
PHP_FUNCTION(date_isodate_set)
{
zval *object;
@@ -2088,7 +2119,7 @@ PHP_FUNCTION(date_isodate_set)
timelib_update_ts(dateobj->time, NULL);
}
-
+/* }}} */
static int timezone_initialize(timelib_tzinfo **tzi, /*const*/ char *tz TSRMLS_DC)
{
@@ -2110,6 +2141,8 @@ static int timezone_initialize(timelib_tzinfo **tzi, /*const*/ char *tz TSRMLS_D
}
}
+/* {{{ proto DateTimeZone timezone_open(string timezone)
+*/
PHP_FUNCTION(timezone_open)
{
char *tz;
@@ -2124,7 +2157,10 @@ PHP_FUNCTION(timezone_open)
}
((php_timezone_obj *) zend_object_store_get_object(date_instantiate(date_ce_timezone, return_value TSRMLS_CC) TSRMLS_CC))->tz = tzi;
}
+/* }}} */
+/* {{{ proto DateTimeZone::__construct(string timezone)
+*/
PHP_METHOD(DateTimeZone, __construct)
{
char *tz;
@@ -2139,7 +2175,10 @@ PHP_METHOD(DateTimeZone, __construct)
}
php_set_error_handling(EH_NORMAL, NULL TSRMLS_CC);
}
+/* }}} */
+/* {{{ proto string timezone_name_get(DateTimeZone object)
+*/
PHP_FUNCTION(timezone_name_get)
{
zval *object;
@@ -2153,7 +2192,10 @@ PHP_FUNCTION(timezone_name_get)
RETURN_STRING(tzobj->tz->name, 1);
}
+/* }}} */
+/* {{{ proto string timezone_name_from_abbr(string abbr[, long gmtOffset[, long isdst]])
+*/
PHP_FUNCTION(timezone_name_from_abbr)
{
char *abbr;
@@ -2173,7 +2215,10 @@ PHP_FUNCTION(timezone_name_from_abbr)
RETURN_FALSE;
}
}
+/* }}} */
+/* {{{ proto long timezone_offset_get(DateTimeZone object, DateTime object)
+*/
PHP_FUNCTION(timezone_offset_get)
{
zval *object, *dateobject;
@@ -2193,7 +2238,10 @@ PHP_FUNCTION(timezone_offset_get)
RETVAL_LONG(offset->offset);
timelib_time_offset_dtor(offset);
}
+/* }}} */
+/* {{{ proto array timezone_transitions_get(DateTimeZone object)
+*/
PHP_FUNCTION(timezone_transitions_get)
{
zval *object, *element;
@@ -2219,7 +2267,10 @@ PHP_FUNCTION(timezone_transitions_get)
add_next_index_zval(return_value, element);
}
}
+/* }}} */
+/* {{{ proto array timezone_identifiers_list()
+*/
PHP_FUNCTION(timezone_identifiers_list)
{
const timelib_tzdb *tzdb;
@@ -2236,7 +2287,10 @@ PHP_FUNCTION(timezone_identifiers_list)
add_next_index_string(return_value, table[i].id, 1);
};
}
+/* }}} */
+/* proto {{{ array timezone_abbreviations_list()
+*/
PHP_FUNCTION(timezone_abbreviations_list)
{
const timelib_tz_lookup_table *table, *entry;
@@ -2268,7 +2322,7 @@ PHP_FUNCTION(timezone_abbreviations_list)
entry++;
} while (entry->name);
}
-
+/* }}} */
/* {{{ proto bool date_default_timezone_set(string timezone_identifier)
Sets the default timezone used by all date/time functions in a script */