PHP  
 PHP: Test and Code Coverage Analysis
downloads | QA | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | my php.net 
 

LCOV - code coverage report
Current view: top level - ext/intl/collator - collator.c (source / functions) Hit Total Coverage
Test: PHP Code Coverage Lines: 28 30 93.3 %
Date: 2014-08-04 Functions: 1 1 100.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /*
       2             :    +----------------------------------------------------------------------+
       3             :    | PHP Version 5                                                        |
       4             :    +----------------------------------------------------------------------+
       5             :    | This source file is subject to version 3.01 of the PHP license,      |
       6             :    | that is bundled with this package in the file LICENSE, and is        |
       7             :    | available through the world-wide-web at the following url:           |
       8             :    | http://www.php.net/license/3_01.txt                                  |
       9             :    | If you did not receive a copy of the PHP license and are unable to   |
      10             :    | obtain it through the world-wide-web, please send a note to          |
      11             :    | license@php.net so we can mail you a copy immediately.               |
      12             :    +----------------------------------------------------------------------+
      13             :    | Authors: Vadim Savchuk <vsavchuk@productengine.com>                  |
      14             :    |          Dmitry Lakhtyuk <dlakhtyuk@productengine.com>               |
      15             :    +----------------------------------------------------------------------+
      16             :  */
      17             : 
      18             : #ifdef HAVE_CONFIG_H
      19             : #include "config.h"
      20             : #endif
      21             : 
      22             : #include "collator_class.h"
      23             : #include "collator.h"
      24             : 
      25             : #include <unicode/utypes.h>
      26             : #include <unicode/ucol.h>
      27             : #include <unicode/ustring.h>
      28             : 
      29             : /* {{{ collator_register_constants
      30             :  * Register constants common for the both (OO and procedural)
      31             :  * APIs.
      32             :  */
      33       21265 : void collator_register_constants( INIT_FUNC_ARGS )
      34             : {
      35       21265 :         if( !Collator_ce_ptr )
      36             :         {
      37           0 :                 zend_error( E_ERROR, "Collator class not defined" );
      38           0 :                 return;
      39             :         }
      40             : 
      41             :         #define COLLATOR_EXPOSE_CONST(x) REGISTER_LONG_CONSTANT(#x, x, CONST_CS)
      42             :         #define COLLATOR_EXPOSE_CLASS_CONST(x) zend_declare_class_constant_long( Collator_ce_ptr, ZEND_STRS( #x ) - 1, UCOL_##x TSRMLS_CC );
      43             :         #define COLLATOR_EXPOSE_CUSTOM_CLASS_CONST(name, value) zend_declare_class_constant_long( Collator_ce_ptr, ZEND_STRS( name ) - 1, value TSRMLS_CC );
      44             : 
      45             :         /* UColAttributeValue constants */
      46       21265 :         COLLATOR_EXPOSE_CUSTOM_CLASS_CONST( "DEFAULT_VALUE", UCOL_DEFAULT );
      47             : 
      48       21265 :         COLLATOR_EXPOSE_CLASS_CONST( PRIMARY );
      49       21265 :         COLLATOR_EXPOSE_CLASS_CONST( SECONDARY );
      50       21265 :         COLLATOR_EXPOSE_CLASS_CONST( TERTIARY );
      51       21265 :         COLLATOR_EXPOSE_CLASS_CONST( DEFAULT_STRENGTH );
      52       21265 :         COLLATOR_EXPOSE_CLASS_CONST( QUATERNARY );
      53       21265 :         COLLATOR_EXPOSE_CLASS_CONST( IDENTICAL );
      54             : 
      55       21265 :         COLLATOR_EXPOSE_CLASS_CONST( OFF );
      56       21265 :         COLLATOR_EXPOSE_CLASS_CONST( ON );
      57             : 
      58       21265 :         COLLATOR_EXPOSE_CLASS_CONST( SHIFTED );
      59       21265 :         COLLATOR_EXPOSE_CLASS_CONST( NON_IGNORABLE );
      60             : 
      61       21265 :         COLLATOR_EXPOSE_CLASS_CONST( LOWER_FIRST );
      62       21265 :         COLLATOR_EXPOSE_CLASS_CONST( UPPER_FIRST );
      63             : 
      64             :         /* UColAttribute constants */
      65       21265 :         COLLATOR_EXPOSE_CLASS_CONST( FRENCH_COLLATION );
      66       21265 :         COLLATOR_EXPOSE_CLASS_CONST( ALTERNATE_HANDLING );
      67       21265 :         COLLATOR_EXPOSE_CLASS_CONST( CASE_FIRST );
      68       21265 :         COLLATOR_EXPOSE_CLASS_CONST( CASE_LEVEL );
      69       21265 :         COLLATOR_EXPOSE_CLASS_CONST( NORMALIZATION_MODE );
      70       21265 :         COLLATOR_EXPOSE_CLASS_CONST( STRENGTH );
      71       21265 :         COLLATOR_EXPOSE_CLASS_CONST( HIRAGANA_QUATERNARY_MODE );
      72       21265 :         COLLATOR_EXPOSE_CLASS_CONST( NUMERIC_COLLATION );
      73             : 
      74             :         /* ULocDataLocaleType constants */
      75       21265 :         COLLATOR_EXPOSE_CONST( ULOC_ACTUAL_LOCALE );
      76       21265 :         COLLATOR_EXPOSE_CONST( ULOC_VALID_LOCALE );
      77             : 
      78             :         /* sort flags */
      79       21265 :         COLLATOR_EXPOSE_CUSTOM_CLASS_CONST( "SORT_REGULAR", COLLATOR_SORT_REGULAR );
      80       21265 :         COLLATOR_EXPOSE_CUSTOM_CLASS_CONST( "SORT_STRING",  COLLATOR_SORT_STRING  );
      81       21265 :         COLLATOR_EXPOSE_CUSTOM_CLASS_CONST( "SORT_NUMERIC", COLLATOR_SORT_NUMERIC );
      82             : 
      83             :         #undef COLLATOR_EXPOSE_CUSTOM_CLASS_CONST
      84             :         #undef COLLATOR_EXPOSE_CLASS_CONST
      85             :         #undef COLLATOR_EXPOSE_CONST
      86             : }
      87             : /* }}} */
      88             : 
      89             : /*
      90             :  * Local variables:
      91             :  * tab-width: 4
      92             :  * c-basic-offset: 4
      93             :  * End:
      94             :  * vim600: noet sw=4 ts=4 fdm=marker
      95             :  * vim<600: noet sw=4 ts=4
      96             :  */

Generated by: LCOV version 1.10

Generated at Mon, 04 Aug 2014 15:49:05 +0000 (26 days ago)

Copyright © 2005-2014 The PHP Group
All rights reserved.