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/dom - entity.c (source / functions) Hit Total Coverage
Test: PHP Code Coverage Lines: 0 44 0.0 %
Date: 2014-10-22 Functions: 0 9 0.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /*
       2             :    +----------------------------------------------------------------------+
       3             :    | PHP Version 7                                                        |
       4             :    +----------------------------------------------------------------------+
       5             :    | Copyright (c) 1997-2014 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$ */
      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             : /*
      32             : * class DOMEntity extends DOMNode 
      33             : *
      34             : * URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#ID-527DCFF2
      35             : * Since: 
      36             : */
      37             : 
      38             : const zend_function_entry php_dom_entity_class_functions[] = {
      39             :         PHP_FE_END
      40             : };
      41             : 
      42             : /* {{{ publicId string  
      43             : readonly=yes 
      44             : URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#ID-D7303025
      45             : Since: 
      46             : */
      47           0 : int dom_entity_public_id_read(dom_object *obj, zval *retval TSRMLS_DC)
      48             : {
      49           0 :         xmlEntity *nodep = (xmlEntity *) dom_object_get_node(obj);
      50             : 
      51           0 :         if (nodep == NULL) {
      52           0 :                 php_dom_throw_error(INVALID_STATE_ERR, 0 TSRMLS_CC);
      53           0 :                 return FAILURE;
      54             :         }
      55             : 
      56           0 :         if (nodep->etype != XML_EXTERNAL_GENERAL_UNPARSED_ENTITY) {
      57           0 :                 ZVAL_NULL(retval);
      58             :         } else {
      59           0 :                 ZVAL_STRING(retval, (char *) (nodep->ExternalID));
      60             :         }
      61             : 
      62           0 :         return SUCCESS;
      63             : }
      64             : 
      65             : /* }}} */
      66             : 
      67             : /* {{{ systemId string  
      68             : readonly=yes 
      69             : URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#ID-D7C29F3E
      70             : Since: 
      71             : */
      72           0 : int dom_entity_system_id_read(dom_object *obj, zval *retval TSRMLS_DC)
      73             : {
      74           0 :         xmlEntity *nodep = (xmlEntity *) dom_object_get_node(obj);
      75             : 
      76           0 :         if (nodep == NULL) {
      77           0 :                 php_dom_throw_error(INVALID_STATE_ERR, 0 TSRMLS_CC);
      78           0 :                 return FAILURE;
      79             :         }
      80             : 
      81           0 :         if (nodep->etype != XML_EXTERNAL_GENERAL_UNPARSED_ENTITY) {
      82           0 :                 ZVAL_NULL(retval);
      83             :         } else {
      84           0 :                 ZVAL_STRING(retval, (char *) (nodep->SystemID));
      85             :         }
      86             : 
      87           0 :         return SUCCESS;
      88             : }
      89             : 
      90             : /* }}} */
      91             : 
      92             : /* {{{ notationName     string  
      93             : readonly=yes 
      94             : URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#ID-6ABAEB38
      95             : Since: 
      96             : */
      97           0 : int dom_entity_notation_name_read(dom_object *obj, zval *retval TSRMLS_DC)
      98             : {
      99           0 :         xmlEntity *nodep = (xmlEntity *) dom_object_get_node(obj);
     100             :         char *content;
     101             : 
     102           0 :         if (nodep == NULL) {
     103           0 :                 php_dom_throw_error(INVALID_STATE_ERR, 0 TSRMLS_CC);
     104           0 :                 return FAILURE;
     105             :         }
     106             : 
     107           0 :         if (nodep->etype != XML_EXTERNAL_GENERAL_UNPARSED_ENTITY) {
     108           0 :                 ZVAL_NULL(retval);
     109             :         } else {
     110           0 :                 content = (char *) xmlNodeGetContent((xmlNodePtr) nodep);
     111           0 :                 ZVAL_STRING(retval, content);
     112           0 :                 xmlFree(content);
     113             :         }
     114             : 
     115           0 :         return SUCCESS;
     116             : }
     117             : 
     118             : /* }}} */
     119             : 
     120             : /* {{{ actualEncoding   string  
     121             : readonly=no 
     122             : URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#Entity3-actualEncoding
     123             : Since: DOM Level 3
     124             : */
     125           0 : int dom_entity_actual_encoding_read(dom_object *obj, zval *retval TSRMLS_DC)
     126             : {
     127           0 :         ZVAL_NULL(retval);
     128           0 :         return SUCCESS;
     129             : }
     130             : 
     131           0 : int dom_entity_actual_encoding_write(dom_object *obj, zval *newval TSRMLS_DC)
     132             : {
     133           0 :         return SUCCESS;
     134             : }
     135             : 
     136             : /* }}} */
     137             : 
     138             : /* {{{ encoding string  
     139             : readonly=no 
     140             : URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#Entity3-encoding
     141             : Since: DOM Level 3
     142             : */
     143           0 : int dom_entity_encoding_read(dom_object *obj, zval *retval TSRMLS_DC)
     144             : {
     145           0 :         ZVAL_NULL(retval);
     146           0 :         return SUCCESS;
     147             : }
     148             : 
     149           0 : int dom_entity_encoding_write(dom_object *obj, zval *newval TSRMLS_DC)
     150             : {
     151           0 :         return SUCCESS;
     152             : }
     153             : 
     154             : /* }}} */
     155             : 
     156             : /* {{{ version  string  
     157             : readonly=no 
     158             : URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#Entity3-version
     159             : Since: DOM Level 3
     160             : */
     161           0 : int dom_entity_version_read(dom_object *obj, zval *retval TSRMLS_DC)
     162             : {
     163           0 :         ZVAL_NULL(retval);
     164           0 :         return SUCCESS;
     165             : }
     166             : 
     167           0 : int dom_entity_version_write(dom_object *obj, zval *newval TSRMLS_DC)
     168             : {
     169           0 :         return SUCCESS;
     170             : }
     171             : 
     172             : /* }}} */
     173             : 
     174             : #endif
     175             : 
     176             : /*
     177             :  * Local variables:
     178             :  * tab-width: 4
     179             :  * c-basic-offset: 4
     180             :  * End:
     181             :  * vim600: noet sw=4 ts=4 fdm=marker
     182             :  * vim<600: noet sw=4 ts=4
     183             :  */

Generated by: LCOV version 1.10

Generated at Wed, 22 Oct 2014 07:24:47 +0000 (23 hours ago)

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