> For the complete documentation index, see [llms.txt](https://yugalphp.gitbook.io/php/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://yugalphp.gitbook.io/php/frontend-ssg-spa/other-php-functions.md).

# Other PHP Functions

There are some methods from \`$yugal\` class that are useful, you do not need to define it as it is already defined in router file.

## $yugal->style($csscode);

This method is used to add CSS code to external CSS file which will be defined globally. This can be called multple times and code will be appended.

## $yugal->add\_js($path\_to\_js\_file);

This method is used to add external JS file to site globally. This method can be called multiple times, and scripts will be appended.

### $yugal->theme($theme\_colour);

Use this method to define theme colour to your site, this should be called only one time, however multiple occurence will not give and error, it will just keep updating the colour. Browsers do use it.

### $yugal->favicon($path\_to\_favicon);

Use this function to define custom favicon to project apart from `favicon.ico` in root directory.

### $yugal->script($js\_code);

Use this function to define custom JavaScript code which will be saved in `chunk.js`, and is called on all pages. So use this function to define global JS, this function can be defined multiple times, it will just keep appending the code.

### $yugal->libray($library\_name);

Use this function to use installed library in the project, this function can be called multiple times.

### $yugal->header($head\_code);

Use this function to define Global `<head>` code for the project. This function should be called only once.

### $yugal->\_project\_root

This variable can be used to call project's root path.

### $yugal->noscript($html\_code);

Use this function to define `<noscript>` tag on all pages of the project.
