CampTemplate::trigger_error PHP Method

trigger_error() public method

Inserts an error message into the errors list.
public trigger_error ( string $p_message, object $p_smarty = null )
$p_message string
$p_smarty object
    public function trigger_error($p_message, $p_smarty = null)
    {
        if (!self::singleton()->m_preview) {
            return;
        }
        if (is_object($p_smarty)) {
            $p_smarty->trigger_error($p_message);
        } else {
            trigger_error("Newscoop error: {$p_message}");
        }
    }

Usage Example

Esempio n. 1
0
 public function __toString()
 {
 	$className = get_class($this);
 	if (strncasecmp($className, 'Meta', 4) == 0) {
 		$className = strtolower(substr($className, 4));
 	}
 	CampTemplate::trigger_error("Invalid use of object of type '$className'. Use \$campsite->${className}->[property_name] to display a property of this object.");
 	return null;
 }
All Usage Examples Of CampTemplate::trigger_error