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: 2019-05-06 Functions: 0 9 0.0 %
Legend: Lines: hit not hit

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

Generated by: LCOV version 1.10

Generated at Mon, 06 May 2019 17:58:13 +0000 (998 days ago)

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