public function prepareTitleForPersist($title)
    {
        // Strip whitespace (or other characters) from the beginning and end of a string
        $transformedTitle = trim($title);

        // Strip HTML and PHP tags from a string
        $transformedTitle = strip_tags($transformedTitle);

        // Strip tags, optionally strip or encode special characters
        // http://php.net/manual/en/filter.filters.sanitize.php
        $transformedTitle = filter_var($transformedTitle, FILTER_SANITIZE_STRING);

        // Uppercase the first character of each word in a string
        $transformedTitle = ucwords($transformedTitle);

        return $transformedTitle;
    }
public function prepareTitleForPersist($title)
    {
        // Strip whitespace (or other characters) from the beginning and end of a string
        $transformedTitle = trim($title);

        // Strip HTML and PHP tags from a string
        $transformedTitle = strip_tags($transformedTitle);

        // Strip tags, optionally strip or encode special characters
        // http://php.net/manual/en/filter.filters.sanitize.php
        $transformedTitle = filter_var($transformedTitle, FILTER_SANITIZE_STRING);

        // Uppercase the first character of each word in a string
        $transformedTitle = ucwords($transformedTitle);

        return $transformedTitle;
    }
public function prepareTitleForPersist ( $ title ) { // Strip whitespace (or other characters) from the beginning and end of a string $ transformedTitle = trim ( $ title ) ; // Strip HTML and PHP tags from a string $ transformedTitle = strip_tags ( $ transformedTitle ) ; // Strip tags, optionally strip or encode special characters // http://php.net/manual/en/filter.filters.sanitize.php $ transformedTitle = filter_var ( $ transformedTitle , FILTER_SANITIZE_STRING ) ; // Uppercase the first character of each word in a string $ transformedTitle = ucwords ( $ transformedTitle ) ; return $ transformedTitle ; }
Transform title for persist.

@param  text  $title
@return text
Transform title for persist .