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

LTP GCOV extension - code coverage report
Current view: directory - dom - notation.c
Test: PHP Code Coverage
Date: 2009-11-21 Instrumented lines: 20
Code covered: 70.0 % Executed lines: 14
Legend: not executed executed

       1                 : /*
       2                 :    +----------------------------------------------------------------------+
       3                 :    | PHP Version 5                                                        |
       4                 :    +----------------------------------------------------------------------+
       5                 :    | Copyright (c) 1997-2009 The PHP Group                                |
       6                 :    +----------------------------------------------------------------------+
       7                 :    | This source file is subject to version 3.01 of the PHP license,      |
       8                 :    | that is bundled with this package in the file LICENSE, and is        |
       9                 :    | available through the world-wide-web at the following url:           |
      10                 :    | http://www.php.net/license/3_01.txt                                  |
      11                 :    | If you did not receive a copy of the PHP license and are unable to   |
      12                 :    | obtain it through the world-wide-web, please send a note to          |
      13                 :    | license@php.net so we can mail you a copy immediately.               |
      14                 :    +----------------------------------------------------------------------+
      15                 :    | Authors: Christian Stocker <chregu@php.net>                          |
      16                 :    |          Rob Richards <rrichards@php.net>                            |
      17                 :    +----------------------------------------------------------------------+
      18                 : */
      19                 : 
      20                 : /* $Id: notation.c 272370 2008-12-31 11:15:49Z sebastian $ */
      21                 : 
      22                 : #ifdef HAVE_CONFIG_H
      23                 : #include "config.h"
      24                 : #endif
      25                 : 
      26                 : #include "php.h"
      27                 : #if HAVE_LIBXML && HAVE_DOM
      28                 : #include "php_dom.h"
      29                 : 
      30                 : /*
      31                 : * class DOMNotation extends DOMNode 
      32                 : *
      33                 : * URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#ID-5431D1B9
      34                 : * Since: 
      35                 : */
      36                 : 
      37                 : const zend_function_entry php_dom_notation_class_functions[] = {
      38                 :         {NULL, NULL, NULL}
      39                 : };
      40                 : 
      41                 : /* {{{ attribute protos, not implemented yet */
      42                 : 
      43                 : /* {{{ publicId string  
      44                 : readonly=yes 
      45                 : URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#ID-54F2B4D0
      46                 : Since: 
      47                 : */
      48                 : int dom_notation_public_id_read(dom_object *obj, zval **retval TSRMLS_DC)
      49               2 : {
      50                 :         xmlEntityPtr nodep;
      51                 : 
      52               2 :         nodep = (xmlEntityPtr) dom_object_get_node(obj);
      53                 : 
      54               2 :         if (nodep == NULL) {
      55               0 :                 php_dom_throw_error(INVALID_STATE_ERR, 0 TSRMLS_CC);
      56               0 :                 return FAILURE;
      57                 :         }
      58                 : 
      59               2 :         ALLOC_ZVAL(*retval);
      60               2 :         if (nodep->ExternalID) {
      61               2 :                 ZVAL_STRING(*retval, (char *) (nodep->ExternalID), 1);
      62                 :         } else {
      63               0 :                 ZVAL_EMPTY_STRING(*retval);
      64                 :         }
      65                 : 
      66               2 :         return SUCCESS;
      67                 : }
      68                 : 
      69                 : /* }}} */
      70                 : 
      71                 : /* {{{ systemId string  
      72                 : readonly=yes 
      73                 : URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#ID-E8AAB1D0
      74                 : Since: 
      75                 : */
      76                 : int dom_notation_system_id_read(dom_object *obj, zval **retval TSRMLS_DC)
      77               2 : {
      78                 :         xmlEntityPtr nodep;
      79                 : 
      80               2 :         nodep = (xmlEntityPtr) dom_object_get_node(obj);
      81                 : 
      82               2 :         if (nodep == NULL) {
      83               0 :                 php_dom_throw_error(INVALID_STATE_ERR, 0 TSRMLS_CC);
      84               0 :                 return FAILURE;
      85                 :         }
      86                 : 
      87               2 :         ALLOC_ZVAL(*retval);
      88               2 :         if (nodep->SystemID) {
      89               2 :                 ZVAL_STRING(*retval, (char *) (nodep->SystemID), 1);
      90                 :         } else {
      91               0 :                 ZVAL_EMPTY_STRING(*retval);
      92                 :         }
      93                 : 
      94               2 :         return SUCCESS;
      95                 : }
      96                 : 
      97                 : /* }}} */
      98                 : 
      99                 : /* }}} */
     100                 : 
     101                 : #endif
     102                 : 
     103                 : /*
     104                 :  * Local variables:
     105                 :  * tab-width: 4
     106                 :  * c-basic-offset: 4
     107                 :  * End:
     108                 :  * vim600: noet sw=4 ts=4 fdm=marker
     109                 :  * vim<600: noet sw=4 ts=4
     110                 :  */

Generated by: LTP GCOV extension version 1.5

Generated at Sat, 21 Nov 2009 12:26:59 +0000 (3 days ago)

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