Skip to content

Instantly share code, notes, and snippets.

@b1rdex
Created May 22, 2013 00:14

Revisions

  1. b1rdex created this gist May 22, 2013.
    16 changes: 16 additions & 0 deletions gistfile1.php
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,16 @@
    static public function build($formula, $isCalculable = self::CALCULABLE)
    {
    return new Formula($formula, $isCalculable);
    }

    public function setVars(array $vars)
    {
    $this->parameterBag->datas = array_merge($this->parameterBag->datas, $vars);

    return $this;
    }

    public function evaluate()
    {
    return $this->render();
    }