Public Functions
337221
function(v, storeT, storeL) {
  this.platform = util.format('%s-%s%s', os.arch(), os.platform(), os.release());
  this.options = {
    method: 'GET',
    uri: '',
    json: true,
    resolveWithFullResponse: true,
    gzip: true,
    headers: {
      'Authorization': '',
      'User-Agent': util.format('MySportsFeeds-Node/%s (%s)', libVersion, this.platform)
    },
    qs: {},
    transform: function(body) {
      // console.log("response = '" + util.inspect(body, {depth: null}) + "'");

      return body;
    }
  };
  this.auth = null;
  this.baseUrl = null;

  this.verbose = v;
  this.storeType = storeT;
  this.storeLocation = storeL;
  this.baseUrl = "https://api.mysportsfeeds.com/v1.0/pull";

  this.validFeeds = [
      'cumulative_player_stats',
      'full_game_schedule',
      'daily_game_schedule',
      'daily_player_stats',
      'game_boxscore',
      'scoreboard',
      'game_playbyplay',
      'player_gamelogs',
      'team_gamelogs',
      'roster_players',
      'game_startinglineup',
      'active_players',
      'overall_team_standings',
      'conference_team_standings',
      'division_team_standings',
      'playoff_team_standings',
      'player_injuries',
      'daily_dfs',
      'current_season',
      'latest_updates'
  ];
}
689251
function invoke() {
        parent::invoke();

        $result = true;

        // Set own core attributes
        $this->does_generate = ACTION_GENERATE_HTML;

        // These are always here
        global $CFG, $XMLDB, $SESSION, $DB;

        // Get lastused
        $o = '';
        if (isset($SESSION->lastused)) {
            if ($lastused = $SESSION->lastused) {
                // Print link
                $o .= '<p class="centerpara"><a href="#lastused">' . $this->str['gotolastused'] . '</a></p>';
            }
        } else {
            $lastused = NULL;
        }

        // Calculate the buttons
        $b = '<p class="centerpara buttons">';
        // The reserved_words button
        $b .= '&nbsp;<a href="index.php?action=view_reserved_words">[' . $this->str['reservedwords'] . ']</a>';
        // The docs button
        $b .= '&nbsp;<a href="index.php?action=generate_all_documentation">[' . $this->str['doc'] . ']</a>';
        // The check indexes button
        $b .= '&nbsp;<a href="index.php?action=check_indexes&amp;sesskey=' . sesskey() . '">[' . $this->str['checkindexes'] . ']</a>';
        // The check defaults button
        $b .= '&nbsp;<a href="index.php?action=check_defaults&amp;sesskey=' . sesskey() . '">[' . $this->str['checkdefaults'] . ']</a>';
        // The check bigints button (only for MySQL and PostgreSQL) MDL-11038a
        if ($DB->get_dbfamily() == 'mysql' || $DB->get_dbfamily() == 'postgres') {
            $b .= '&nbsp;<a href="index.php?action=check_bigints&amp;sesskey=' . sesskey() . '">[' . $this->str['checkbigints'] . ']</a>';
        }
        // The check semantics button (only for Oracle) MDL-29416
        if ($DB->get_dbfamily() == 'oracle') {
            $b .= '&nbsp;<a href="index.php?action=check_oracle_semantics&amp;sesskey=' . sesskey() . '">[' . $this->str['checkoraclesemantics'] . ']</a>';
        }
        $b .= '&nbsp;<a href="index.php?action=check_foreign_keys&amp;sesskey=' . sesskey() . '">[' . $this->str['checkforeignkeys'] . ']</a>';
        $b .= '</p>';
        // Send buttons to output
        $o .= $b;

        // Do the job

        // Get the list of DB directories
        $result = $this->launch('get_db_directories');
        // Display list of DB directories if everything is ok
        if ($result && !empty($XMLDB->dbdirs)) {
            $o .= '<table id="listdirectories" border="0" cellpadding="5" cellspacing="1" class="admintable generaltable">';
            $row = 0;
            foreach ($XMLDB->dbdirs as $key => $dbdir) {
                // Detect if this is the lastused dir
                $hithis = false;
                if (str_replace($CFG->dirroot, '', $key) == $lastused) {
                    $hithis = true;
                }
                $elementtext = str_replace($CFG->dirroot . '/', '', $key);
                // Calculate the dbdir has_changed field if needed
                if (!isset($dbdir->has_changed) && isset($dbdir->xml_loaded)) {
                    $dbdir->xml_changed = false;
                    if (isset($XMLDB->editeddirs[$key])) {
                        $editeddir = $XMLDB->editeddirs[$key];
                        if (isset($editeddir->xml_file)) {
                            $structure = $editeddir->xml_file->getStructure();
                            if ($structure->hasChanged()) {
                                $dbdir->xml_changed = true;
                                $editeddir->xml_changed = true;
                            }
                        }
                    }
                }
                // The file name (link to edit if the file is loaded)
                if ($dbdir->path_exists &&
                    file_exists($key . '/install.xml') &&
                    is_readable($key . '/install.xml') &&
                    is_readable($key) &&
                    !empty($dbdir->xml_loaded)) {
                    $f = '<a href="index.php?action=edit_xml_file&amp;dir=' . urlencode(str_replace($CFG->dirroot, '', $key)) . '">' . $elementtext . '</a>';
                } else {
                    $f = $elementtext;
                }
                // Calculate the buttons
                $b = ' <td class="button cell">';
                // The create button
                if ($dbdir->path_exists &&
                    !file_exists($key . '/install.xml') &&
                    is_writeable($key)) {
                    $b .= '<a href="index.php?action=create_xml_file&amp;sesskey=' . sesskey() . '&amp;dir=' . urlencode(str_replace($CFG->dirroot, '', $key)) . '&amp;time=' . time() . '&amp;postaction=main_view#lastused">[' . $this->str['create'] . ']</a>';
                } else {
                    $b .= '[' . $this->str['create'] . ']';
                }
                $b .= '</td><td class="button cell">';
                // The load button
                if ($dbdir->path_exists &&
                    file_exists($key . '/install.xml') &&
                    is_readable($key . '/install.xml') &&
                    empty($dbdir->xml_loaded)) {
                    $b .= '<a href="index.php?action=load_xml_file&amp;dir=' . urlencode(str_replace($CFG->dirroot, '', $key)) . '&amp;time=' . time() . '&amp;postaction=main_view#lastused">[' . $this->str['load'] . ']</a>';
                } else {
                    $b .= '[' . $this->str['load'] . ']';
                }
                $b .= '</td><td class="button cell">';
                // The edit button
                if ($dbdir->path_exists &&
                    file_exists($key . '/install.xml') &&
                    is_readable($key . '/install.xml') &&
                    is_readable($key) &&
                    !empty($dbdir->xml_loaded)) {
                    $b .= '<a href="index.php?action=edit_xml_file&amp;dir=' . urlencode(str_replace($CFG->dirroot, '', $key)) . '">[' . $this->str['edit'] . ']</a>';
                } else {
                    $b .= '[' . $this->str['edit'] . ']';
                }
                $b .= '</td><td class="button cell">';
                // The save button
                if ($dbdir->path_exists &&
                    file_exists($key . '/install.xml') &&
                    is_writeable($key . '/install.xml') &&
                    is_writeable($key) &&
                    !empty($dbdir->xml_loaded) &&
                    !empty($dbdir->xml_changed)) {
                    $b .= '<a href="index.php?action=save_xml_file&amp;sesskey=' . sesskey() . '&amp;dir=' . urlencode(str_replace($CFG->dirroot, '', $key)) . '&amp;time=' . time() . '&amp;postaction=main_view#lastused">[' . $this->str['save'] . ']</a>';
                    // Check if the file has been manually edited while being modified in the editor
                    if ($dbdir->filemtime != filemtime($key . '/install.xml')) {
                        // File manually modified. Add to action error, will be displayed inline.
                        $this->errormsg = $this->str['filemodifiedoutfromeditor'];
                    }
                } else {
                    $b .= '[' . $this->str['save'] . ']';
                }
                $b .= '</td><td class="button cell">';
                // The document button
                if ($dbdir->path_exists &&
                    file_exists($key . '/install.xml') &&
                    is_readable($key . '/install.xml') &&
                    is_readable($key)) {
                    $b .= '<a href="index.php?action=generate_documentation&amp;dir=' . urlencode(str_replace($CFG->dirroot, '', $key)) . '">[' . $this->str['doc'] . ']</a>';
                } else {
                    $b .= '[' . $this->str['doc'] . ']';
                }
                $b .= '</td><td class="button cell">';
                // The view xml button
                if ($dbdir->path_exists &&
                    file_exists($key . '/install.xml') &&
                    is_readable($key . '/install.xml')) {
                    $b .= '<a href="index.php?action=view_xml&amp;file=' . urlencode(str_replace($CFG->dirroot, '', $key) . '/install.xml') . '">[' . $this->str['viewxml'] . ']</a>';
                } else {
                    $b .= '[' . $this->str['viewxml'] . ']';
                }
                $b .= '</td><td class="button cell">';
                // The revert button
                if ($dbdir->path_exists &&
                    file_exists($key . '/install.xml') &&
                    is_readable($key . '/install.xml') &&
                    is_writeable($key) &&
                    !empty($dbdir->xml_loaded) &&
                    !empty($dbdir->xml_changed)) {
                    $b .= '<a href="index.php?action=revert_changes&amp;sesskey=' . sesskey() . '&amp;dir=' . urlencode(str_replace($CFG->dirroot, '', $key)) . '">[' . $this->str['revert'] . ']</a>';
                } else {
                    $b .= '[' . $this->str['revert'] . ']';
                }
                $b .= '</td><td class="button cell">';
                // The unload button
                if ($dbdir->path_exists &&
                    file_exists($key . '/install.xml') &&
                    is_readable($key . '/install.xml') &&
                    !empty($dbdir->xml_loaded) &&
                    empty($dbdir->xml_changed)) {
                    $b .= '<a href="index.php?action=unload_xml_file&amp;dir=' . urlencode(str_replace($CFG->dirroot, '', $key)) . '&amp;time=' . time() . '&amp;postaction=main_view#lastused">[' . $this->str['unload'] . ']</a>';
                } else {
                    $b .= '[' . $this->str['unload'] . ']';
                }
                $b .= '</td><td class="button cell">';
                // The delete button
                if ($dbdir->path_exists &&
                    file_exists($key . '/install.xml') &&
                    is_readable($key . '/install.xml') &&
                    is_writeable($key) &&
                    empty($dbdir->xml_loaded)) {
                    $b .= '<a href="index.php?action=delete_xml_file&amp;sesskey=' . sesskey() . '&amp;dir=' . urlencode(str_replace($CFG->dirroot, '', $key)) . '">[' . $this->str['delete'] . ']</a>';
                } else {
                    $b .= '[' . $this->str['delete'] . ']';
                }
                $b .= '</td>';
                // include the higlight
                if ($hithis) {
                    $o .= '<tr class="highlight"><td class="directory cell"><a name="lastused" />' . $f . '</td>' . $b . '</tr>';
                } else {
                    $o .= '<tr class="r' . $row . '"><td class="directory cell">' . $f . '</td>' . $b . '</tr>';
                }
                $row = ($row + 1) % 2;
                // show errors if they exist
                if (isset($dbdir->xml_file)) {
                    if ($structure = $dbdir->xml_file->getStructure()) {
                        $errors = !empty($this->errormsg) ? array($this->errormsg) : array();
                        $structureerrors = $structure->getAllErrors();
                        if ($structureerrors) {
                            $errors = array_merge($errors, $structureerrors);
                        }
                        if (!empty($errors)) {
                            if ($hithis) {
                                $o .= '<tr class="highlight"><td class="error cell" colspan="10">' . implode (', ', $errors) . '</td></tr>';
                            } else {
                                $o .= '<tr class="r' . $row . '"><td class="error cell" colspan="10">' . implode (', ', $errors) . '</td></tr>';
                            }
                        }
                    }
                }
                // If there are changes pending to be saved, but the file cannot be written... inform here
                if ($dbdir->path_exists &&
                    file_exists($key . '/install.xml') &&
                    !empty($dbdir->xml_loaded) &&
                    !empty($dbdir->xml_changed) &&
                    (!is_writeable($key . '/install.xml') || !is_writeable($key))) {

                    if ($hithis) {
                        $o .= '<tr class="highlight"><td class="error cell" colspan="10">';
                    } else {
                        $o .= '<tr class="r' . $row . '"><td class="error cell" colspan="10">';
                    }
                    $o .= $this->str['pendingchangescannotbesavedreload'];
                    $o .= '</td></tr>';
                }
            }
            $o .= '</table>';

            // Set the output
            $this->output = $o;
        }

        // Finally, return result
        return $result;
    }
1088591
private static void collectFunctions_r(DebuggableScript function,
                                             ObjArray array) {
        array.add(function);
        for (int i = 0; i != function.getFunctionCount(); ++i) {
            collectFunctions_r(function.getFunction(i), array);
        }
    }
442134
def functions
      @functions ||= @api_info.fetch("functions").inject({}) do |acc, func|
        function = Function.new(func)
        acc.merge(function.name => function)
      end
    end
994992
public static function method()
    {
        $partialArgs = func_get_args();
        if (count($partialArgs) < 1) {
            throw new \InvalidArgumentException();
        }
        $name = array_shift($partialArgs);
        return function () use ($name, $partialArgs) {
            $args = func_get_args();
            if (count($args) < 1) {
                throw new \InvalidArgumentException();
            }
            $obj = array_shift($args);
            return call_user_func_array([&$obj, $name], array_merge($partialArgs, $args));
        };
    }
1104166
function(object, func, thisp) {
		var res = [];
		for (var key in object) {
			res.push(func.call(thisp, key, object[key]));
		}
		return res.filter(function(result) {
			return result !== undefined;
		});
	}
50031
public function perform()
    {
        /** @var ServiceDeclaration $declaration */
        $declaration = $this->createDeclaration();

        foreach ($this->option('method') as $method) {
            $declaration->method($method)->setAccess(MethodDeclaration::ACCESS_PUBLIC);
        }

        $this->writeDeclaration($declaration);
    }
1095606
function FunctionNode() {
		this.arguments = new UNode
		this.return = new UNode
		this.this = new UNode
		this.self = new UNode
		this.calls = []
		this.inherits = []
		this.dynamic_accesses = []
	}
1118017
function templateNodeTransformation( $functionName, &$node,
                                         $tpl, $parameters, $privateData )
    {
        $tpl->ElseifCounter++;
        $newNodes       = array();
        $nodesToPrepend = array();
        $nodesToAppend  = array();
        $nodePlacement  = eZTemplateNodeTool::extractFunctionNodePlacement( $node );
        $uniqid        =  md5( $nodePlacement[2] ) . "_" . $tpl->ElseifCounter;
        $children       = eZTemplateNodeTool::extractFunctionNodeChildren( $node );


        $newNodes[] = eZTemplateNodeTool::createCodePieceNode( "// if begins" );
        $newNodes[] = eZTemplateNodeTool::createVariableNode( false, $parameters['condition'], $nodePlacement, array( 'treat-value-as-non-object' => true ), 'if_cond' );
        $newNodes[] = eZTemplateNodeTool::createCodePieceNode( "if ( \$if_cond )\n{" );
        $newNodes[] = eZTemplateNodeTool::createSpacingIncreaseNode();

        if ( is_array( $children ) )
        {
            foreach ( array_keys( $children ) as $childKey )
            {
                $child =& $children[$childKey];

                if ( $child[0] == eZTemplate::NODE_FUNCTION )
                {
                    $childFunctionName =& $child[2];
                    $childChildren     = eZTemplateNodeTool::extractFunctionNodeChildren( $child );
                    $childFunctionArgs =& $child[3];

                    if ( $childFunctionName == 'elseif' )
                    {
                        $compiledElseifCondition = eZTemplateCompiler::processElementTransformationList( $tpl, $child, $childFunctionArgs['condition'], $privateData );
                        $nodesToPrepend[] = eZTemplateNodeTool::createVariableNode( false, $compiledElseifCondition,
                                                                                    $nodePlacement,
                                                                                    array( 'text-result' => true ),
                                                                                    "elseif_cond_$uniqid" );
                        $newNodes[] = eZTemplateNodeTool::createSpacingDecreaseNode();
                        $newNodes[] = eZTemplateNodeTool::createCodePieceNode( "}\nelseif ( \$elseif_cond_$uniqid )\n{" );
                        $newNodes[] = eZTemplateNodeTool::createSpacingIncreaseNode();
                        $nodesToAppend[] = eZTemplateNodeTool::createVariableUnsetNode( "elseif_cond_$uniqid" );
                        // increment unique elseif counter
                        $uniqid        =  md5( $nodePlacement[2] ) . "_" . ++$tpl->ElseifCounter;
                    }
                    elseif ( $childFunctionName == 'else' )
                    {
                        $newNodes[] = eZTemplateNodeTool::createSpacingDecreaseNode();
                        $newNodes[] = eZTemplateNodeTool::createCodePieceNode( "}\nelse\n{" );
                        $newNodes[] = eZTemplateNodeTool::createSpacingIncreaseNode();
                    }
                    elseif ( $childFunctionName == 'break' )
                        $newNodes[] = eZTemplateNodeTool::createCodePieceNode( "break;\n" );
                    elseif ( $childFunctionName == 'continue' )
                        $newNodes[] = eZTemplateNodeTool::createCodePieceNode( "continue;\n" );
                    elseif ( $childFunctionName == 'skip' )
                        $newNodes[] = eZTemplateNodeTool::createCodePieceNode( "\$skipDelimiter = true;\ncontinue;\n" );

                    // let other functions (ones not listed in the conditions above) be transformed
                    if ( in_array( $childFunctionName, array( 'elseif', 'else', 'break', 'continue', 'skip' ) ) )
                         continue;
                }
                $newNodes[] = $child;
            }
        }

        $newNodes[] = eZTemplateNodeTool::createSpacingDecreaseNode();
        $newNodes[] = eZTemplateNodeTool::createCodePieceNode( "}" );
        $newNodes[] = eZTemplateNodeTool::createCodePieceNode( "unset( \$if_cond );" );
        $newNodes[] = eZTemplateNodeTool::createCodePieceNode( "// if ends\n" );

        $newNodes = array_merge( $nodesToPrepend, $newNodes, $nodesToAppend );

        return $newNodes;
    }
341777
function GenerateFunction(
        \Peg\Lib\Definitions\Element\FunctionElement $function_object
    )
    {
        // Variables used by some template files.
        $authors = \Peg\Lib\Settings::GetAuthors();
        $contributors = \Peg\Lib\Settings::GetContributors();
        $extension = \Peg\Lib\Settings::GetExtensionName();
        $version = \Peg\Lib\Settings::GetVersion();

        $namespace_name = $function_object->namespace->name;

        if($namespace_name == "\\")
            $namespace_name = "";

        $namespace_name_cpp = str_replace(
            "\\",
            "::",
            $namespace_name
        );

        $namespace_name_var = str_replace(
            "\\",
            "_",
            $namespace_name
        );

        $function_name = $function_object->name;
        $function_arginfo = $this->GenerateArgInfo($function_object);
        $overloads_count = count($function_object->overloads);

        $function_content = "";

        $parameters_code = "";
        $parse_code = "";
        $return_code = "";

        $proto_header = $this->GetProtoHeader($function_object);
        $proto_footer = $this->GetProtoFooter();

        // Get header of function
        ob_start();
            include($this->GetTemplatePath(
                $function_name,
                "function",
                "head",
                "functions",
                "",
                $namespace_name
            ));
            $function_content .= ob_get_contents();
        ob_end_clean();

         // Parameters declaration
        foreach($function_object->overloads as $overload=>$overload_object)
        {
            // Overload parameters declaration header
            ob_start();
                include($this->GetTemplatePath(
                    $function_name,
                    "overloads",
                    "parameters_header",
                    "helpers",
                    "overload",
                    $namespace_name
                ));
                $parameters_code .= ob_get_contents();
            ob_end_clean();

            foreach($overload_object->parameters as $parameter_name=>$parameter_object)
            {
                // Overload parameter declarations
                ob_start();
                    include($this->GetParameterTemplate($parameter_object, $namespace_name, "declare"));
                    $parameters_code .= ob_get_contents();
                ob_end_clean();
            }

            // Overload parameters declaration footer
            ob_start();
                include($this->GetTemplatePath(
                    $function_name,
                    "overloads",
                    "parameters_footer",
                    "helpers",
                    "overload",
                    $namespace_name
                ));
                $parameters_code .= ob_get_contents();
            ob_end_clean();
        }

        // Parse parameters code
        foreach($function_object->overloads as $overload=>$overload_object)
        {
            $parameters_count = $overload_object->GetParametersCount();
            $required_parameters = $overload_object->GetRequiredParametersCount();

            // Overload parse header
            ob_start();
                include($this->GetTemplatePath(
                    $function_name,
                    "overloads",
                    "parse_header",
                    "helpers",
                    "overload",
                    $namespace_name
                ));
                $parse_code .= ob_get_contents();
            ob_end_clean();

            $parse_string = "";
            $parameters_optional = false;
            $parse_parameters = "";

            $parse_references = "";
            $parse_string_ref = "";
            $parse_reference = "";
            $references_found = false;

            $object_validate_code = "";

            $parameter_index = 0;
            foreach($overload_object->parameters as $parameter_name=>$parameter_object)
            {
                if($parameter_object->default_value && !$parameters_optional)
                {
                    $parse_string .= "|";
                    $parse_string_ref = "|";
                    $parameters_optional = true;
                }

                ob_start();
                    include($this->GetParameterTemplate($parameter_object, $namespace_name, "parse_string"));
                    $parse_string .= ob_get_contents();
                ob_end_clean();

                ob_start();
                    include($this->GetParameterTemplate($parameter_object, $namespace_name, "parse"));
                    $parse_parameters .= ob_get_contents();
                ob_end_clean();

                if(!$parameter_object->is_const && $parameter_object->is_reference)
                    $references_found = true;

                ob_start();
                    include($this->GetParameterTemplate($parameter_object, $namespace_name, "parse_string_ref"));
                    $parse_string_ref .= ob_get_contents();
                ob_end_clean();

                ob_start();
                    include($this->GetParameterTemplate($parameter_object, $namespace_name, "parse_reference"));
                    $parse_reference .= ob_get_contents();
                ob_end_clean();

                if(
                    $this->symbols->GetStandardType($parameter_object)
                    ==
                    \Peg\Lib\Definitions\StandardType::OBJECT
                )
                {
                    ob_start();
                        include($this->GetParameterTemplate($parameter_object, $namespace_name, "object_validate"));
                        $object_validate_code .= $this->Indent(ob_get_contents(), 4);
                    ob_end_clean();
                }

                $parameter_index++;
            }

            // No parameters to parse
            if($required_parameters == 0 && $parameters_count < 1)
            {
                // Overload no parse body
                ob_start();
                    include($this->GetTemplatePath(
                        $function_name,
                        "overloads",
                        "parse_no_body",
                        "helpers",
                        "overload",
                        $namespace_name
                    ));
                    $parse_code .= $this->Indent(ob_get_contents(), 4);
                ob_end_clean();
            }
            // There is parameters to parse
            else
            {
                if($references_found)
                {
                    // Overload parse references
                    ob_start();
                        include($this->GetTemplatePath(
                            $function_name,
                            "overloads",
                            "parse_references",
                            "helpers",
                            "overload"
                        ));
                        $parse_references .= $this->Indent(ob_get_contents(), 4);
                    ob_end_clean();
                }

                // Overload parse body
                ob_start();
                    include($this->GetTemplatePath(
                        $function_name,
                        "overloads",
                        "parse_body",
                        "helpers",
                        "overload",
                        $namespace_name
                    ));
                    $parse_code .= $this->Indent(ob_get_contents(), 4);
                ob_end_clean();
            }

            // Overload parse footer
            ob_start();
                include($this->GetTemplatePath(
                    $function_name,
                    "overloads",
                    "parse_footer",
                    "helpers",
                    "overload",
                    $namespace_name
                ));
                $parse_code .= ob_get_contents();
            ob_end_clean();
        }

        // Return code
        foreach($function_object->overloads as $overload=>$overload_object)
        {
            $parameters_count = $overload_object->GetParametersCount();
            $required_parameters = $overload_object->GetRequiredParametersCount();

            $call_declare_code = "";

            // Optional declarations before proceeding to call an overload
            $parameter_index = 0;
            foreach($overload_object->parameters as $parameter_name=>$parameter_object)
            {
                ob_start();
                    include($this->GetParameterTemplate($parameter_object, "", "call_declare"));
                    $call_declare_code .= $this->Indent(ob_get_contents(), 4);
                ob_end_clean();

                $parameter_index++;
            }

            // Generate the overload return heading
            ob_start();
                include($this->GetTemplatePath(
                    $function_name,
                    "overloads",
                    "return_header",
                    "helpers",
                    "overload",
                    $namespace_name
                ));
                $return_code .= ob_get_contents();
            ob_end_clean();

            // Variables used by after call object template.
            $class_name = "";
            $is_constructor = false;

            for(
                $required_parameters;
                $required_parameters<=$parameters_count;
                $required_parameters++
            )
            {
                // Overload return body header
                ob_start();
                    include($this->GetTemplatePath(
                        $function_name,
                        "overloads",
                        "return_body_header",
                        "helpers",
                        "overload",
                        $namespace_name
                    ));
                    $return_code .= $this->Indent(ob_get_contents(), 8);
                ob_end_clean();

                $parameter_index = 0;
                $parameters_string = "";
                $after_call = "";

                foreach($overload_object->parameters as $parameter_name=>$parameter_object)
                {
                    if($parameter_index<$required_parameters)
                    {
                        ob_start();
                            include($this->GetParameterTemplate($parameter_object, "", "before_call"));
                            $before_call = $this->Indent(ob_get_contents(), 12);
                        ob_end_clean();

                        if(trim($before_call))
                            $return_code .= $before_call;

                        ob_start();
                            include($this->GetParameterTemplate($parameter_object, "", "call"));
                            $parameters_string .= ob_get_contents();
                        ob_end_clean();

                        ob_start();
                            include($this->GetParameterTemplate($parameter_object, "", "after_call"));
                            $after_call .= ob_get_contents();
                        ob_end_clean();
                    }
                    else
                    {
                        break;
                    }

                    $parameter_index++;
                }

                ob_start();
                    include($this->GetReturnTemplate($overload_object->return_type, "", "function"));
                    $return_code .= $this->Indent(ob_get_contents(), 12);
                ob_end_clean();

                $return_code .= $after_call;

                // Overload return body footer
                ob_start();
                    include($this->GetTemplatePath(
                        $function_name,
                        "overloads",
                        "return_body_footer",
                        "helpers",
                        "overload",
                        $namespace_name
                    ));
                    $return_code .= $this->Indent(ob_get_contents(), 8);
                ob_end_clean();
            }

            // Generate the overload return footer
            ob_start();
                include($this->GetTemplatePath(
                    $function_name,
                    "overloads",
                    "return_footer",
                    "helpers",
                    "overload",
                    $namespace_name
                ));
                $return_code .= ob_get_contents();
            ob_end_clean();
        }

        // Get body of function
        ob_start();
            include($this->GetTemplatePath(
                $function_name,
                "function",
                "body",
                "functions",
                "",
                $namespace_name
            ));
            $function_content .= $this->Indent(ob_get_contents(), 4);
        ob_end_clean();

        // Get footer of function
        ob_start();
            include($this->GetTemplatePath(
                $function_name,
                "function",
                "footer",
                "functions",
                "",
                $namespace_name
            ));
            $function_content .= ob_get_contents();
        ob_end_clean();

        return $function_content;
    }
909618
function(func,args) {
    var type = lib.type.typeOf(func);
    if (type === "string") {
      var fargs = [];
      if (args instanceof Array) {
        fargs.push.apply(fargs,args);
      }
      fargs.push(func);
      func = Function.constructor.apply(Function,fargs);
    } else if (type === "error") {
      func = function() { throw func };
    } else if (type === "object") {
      func = new Method(null,func).toFunction();
    } else if (type === "undefined") {
      func = function() {};
    }
    var index = this.functions.length;
    this.functions.push(func);
    return index;
  }
390434
function (/**Array|Object*/tmpl, /**Object*/data) /**String*/{
            var res= "";
            // there are thre possible declarations array of functions, string and function
            // array case
            if (franky.isArray(tmpl)) {
                res = franky.map(tmpl, function (item) {
                    return typeof item === "string" ?
                        item:
                        item(data);
                }).join("");
            // function case
            } else if (franky.isFunction(tmpl)) {
                res = tmpl(data);
            // default string case
            } else {
                res = tmpl.toString();
            }

            return res;
        }
965645
function(object, methods) {
        _.each(methods, function(method, name) {
            if (!_.isFunction(method)) {
                throw new Error('Method "' + name + '" must be a function!');
            }
            object[name] = method
        });
    }
501687
protected function callFunction()
    {
        if ($this->class !== null) {
            // import the classname & unqualify it, if necessary
            $this->class = Phing::import($this->class);

            $user_func = [$this->class, $this->function];
            $h_func = $this->class . '::' . $this->function; // human-readable (for log)
        } else {
            $user_func = $this->function;
            $h_func = $user_func; // human-readable (for log)
        }

        // put parameters into simple array
        $params = [];
        foreach ($this->params as $p) {
            if ($p instanceof Parameter) {
                $value = $p->getParams();
                array_walk_recursive(
                    $value,
                    function (&$item) {
                        if ($item instanceof Parameter) {
                            $item = $item->getValue();
                        }
                    }
                );
                if ($value === null) {
                    continue;
                }
                $params[] = $value;
            } else {
                $params[] = $p->getValue();
            }
        }

        $this->log("Calling PHP function: " . $h_func . "()", $this->logLevel);
        foreach ($params as $p) {
            $this->log("  param: " . print_r($p, true), Project::MSG_VERBOSE);
        }

        $return = call_user_func_array($user_func, $params);

        if ($this->returnProperty !== null) {
            $this->project->setProperty($this->returnProperty, $return);
        }
    }
889709
function set(publicAPI, model = {}, names = []) {
  names.forEach((name) => {
    publicAPI[`set${capitalize(name)}`] = (value) => {
      model[name] = value;
    };
  });
}
1151338
function modify( $tpl, $operatorName, $operatorParameters,
                     $rootNamespace, $currentNamespace, &$operatorValue, $namedParameters, $placement )
    {
        $functionName = $namedParameters['function_name'];
        $functionParameters = $namedParameters['function_parameters'];

        if ( $operatorName == $this->Fetch )
        {
            $moduleName = $namedParameters['module_name'];
            $result = eZFunctionHandler::execute( $moduleName, $functionName, $functionParameters );
            $operatorValue = $result;
        }
        else if ( $operatorName == $this->FetchAlias )
        {
            $result = eZFunctionHandler::executeAlias( $functionName, $functionParameters );
            $operatorValue = $result;
        }
    }
894636
function() {
  var args = arguments;
  return function(err) {
    var params = Array.prototype.slice.call(args);
    params.push(err);
    Entity.debug.apply(Entity.debug, params);
    throw err;
  };
}