You are here

private function SassExtentionsCompassFunctionsInlineData::data in Sassy 7

2 calls to SassExtentionsCompassFunctionsInlineData::data()
SassExtentionsCompassFunctionsInlineData::inline_font_files in phamlp/sass/extensions/compass/functions/inlineData.php
SassExtentionsCompassFunctionsInlineData::inline_image in phamlp/sass/extensions/compass/functions/inlineData.php

File

phamlp/sass/extensions/compass/functions/inlineData.php, line 76

Class

SassExtentionsCompassFunctionsInlineData
Compass extension SassScript inline data functions class. A collection of functions for use in SassSCript. @package PHamlP @subpackage Sass.extensions.compass.functions

Code

private function data($real_path) {
  if (file_exists($real_path)) {
    $fp = fopen($real_path, 'rb');
    return base64_encode(fread($fp, filesize($real_path)));
  }
  else {
    throw new SassScriptFunctionException('Unable to find {what}: {filename}', array(
      '{what}' => 'file',
      '{filename}' => $real_path,
    ), SassScriptParser::$context->node);
  }
}