You are here

function sassy_get_functions in Sassy 7.2

Same name and namespace in other branches
  1. 7.3 sassy.module \sassy_get_functions()

Returns all functions to be used inside the parser. @author Joon Park (dvessel), richthegeek, fubhy

2 calls to sassy_get_functions()
SassyBaseUnitTest::runTest in ./sassy.test
sassy_parse in ./sassy.module
Parse a SCSS string and transform it into CSS.

File

./sassy.module, line 117

Code

function sassy_get_functions() {
  $functions =& drupal_static(__FUNCTION__);
  if (!isset($functions)) {
    foreach (module_invoke_all('sassy_functions') as $info) {
      $info = (object) $info;
      $functions[$info->name] = $info->callback;
    }
    foreach (array_merge($GLOBALS['base_theme_info'], array(
      $GLOBALS['theme_info'],
    )) as $theme) {
      $function = $theme->name . '_sassy_functions';
      if (function_exists($function) && ($data = $function())) {
        foreach ($data as $info) {
          $info = (object) $info;
          $functions[$info->name] = $info->callback;
        }
      }
    }
  }
  return $functions;
}