php_ctemplate: cTemplate.cpp File Reference

- Main Page
- Classes
- Files

- File List
- File Members

# cTemplate.cpp File Reference

## Functions

- resource ctemplate (string filename, int strip_option, string rootdir)
    function to create new ctemplate object
- bool ctemplate_reload ()
    reload template files if the source files changed.
- bool ctemplate_clearcache ()
    clear all cached template files.
- string ctemplate_expand (cTemplateDict dict)
- bool ctemplate_dump ()
- int ctemplate_state ()
- string ctemplate_template_file ()
- bool ctemplate_reloadifchanged ()
- string ctemplate_writeheaderentries ()
- object ctemplate_dict ()
- bool d_SetValue (string key, string val, string section)
- bool d_SetEscapedValue (string key, string val, int escape_option)
- bool d_SetGlobalValue (string key, string val)
- object d_AddSectionDictionary (string another_section)
- bool d_ShowSection (string section)
- object d_AddIncludeDictionary (string another_section)
- bool d_SetFilename (string fn)
- bool d_Dump ()
- string d_DumpToString ()
- bool d_SetAnnotateOutput (string path)

## Detailed Description

## Function Documentation

resource ctemplate | ( | string | filename,
|  | int | strip_option,
|  | string | rootdir
| ) |

  | function to create new ctemplate object Returns: object obj; Parameters:
  | filename | filename of your template.
  | strip_option | strip option (could be NO_NOT_STRIP, STRIP_BLANK_LINES, STRIP_WHITESPACES)
  | rootdir | option parameter, directory of your template files

bool ctemplate_clearcache | ( |  | ) |

| clear all cached template files.

object ctemplate_dict | ( |  | ) |

| Returns:

bool ctemplate_dump | ( |  | ) |

string ctemplate_expand | ( | cTemplateDict | dict | ) |

bool ctemplate_reload | ( |  | ) |

| reload template files if the source files changed.

bool ctemplate_reloadifchanged | ( |  | ) |

int ctemplate_state | ( |  | ) |

string ctemplate_template_file | ( |  | ) |

string ctemplate_writeheaderentries | ( |  | ) |

object d_AddIncludeDictionary | ( | string | another_section | ) |

  | Parameters:
  | another_section |
Returns:

object d_AddSectionDictionary | ( | string | another_section | ) |

  | Parameters:
  | another_section |
Returns:

bool d_Dump | ( |  | ) |

  | Return values:
  | FALSE |
  | TRUE |

string d_DumpToString | ( |  | ) |

  | Return values:
  | FALSE |
  | string |

bool d_SetAnnotateOutput | ( | string | path | ) |

  | Parameters:
  | path |
  Return values:
  | TRUE |
  | FALSE |

bool d_SetEscapedValue | ( | string | key,
|  | string | val,
|  | int | escape_option
| ) |

  | Parameters:
  | key |
  | val |
  | escape_option |
  Return values:
  | TRUE |
  | FALSE |

bool d_SetFilename | ( | string | fn | ) |

  | Parameters:
  | fn |
  Return values:
  | TRUE |
  | FALSE |

bool d_SetGlobalValue | ( | string | key,
|  | string | val
| ) |

  | Parameters:
  | key |
  | val |
  Return values:
  | TRUE |
  | FALSE |

bool d_SetValue | ( | string | key,
|  | string | val,
|  | string | section
| ) |

  | Parameters:
  | key |
  | val |
  | section |
  Return values:
  | TRUE |
  | FALSE |

bool d_ShowSection | ( | string | section | ) |

  | Parameters:
  | section |
  Return values:
  | TRUE |
  | FALSE |