Duio.php
/*
    | The "mixer" for calling methods in the file that's
    | wanted to be used, be it public or private.
    | Beginning of data being manipulated.
    */
| The "mixer" for calling methods in the file that's
| wanted to be used, be it public or private.
| Beginning of data being manipulated.
| The " mixer " for calling methods in the file that ' s | wanted to be used be it public or private . | Beginning of data being manipulated .
public function mix($tocall, $data = [])
      {
        $using = ($this->currentlyUsing) ?  $this->currentlyUsing   : die('No accessor for specific API, please call similarly: <code>$duio->private->...()</code>. Current <b>using</b>: <i>'.$this->currentlyUsing.'</i>');
        $file  = ($using == 'private')   ?  $this->privateApiFile   : $this->publicApiFile;
        foreach ($data as $index => $val) {
          if (strtolower(explode(':',$val)[0]) == 'post' && count(explode(':',$val)) == 2) {
            $split = explode(':',$val);
            if (isset($_POST[$split[1]])) $data[$index] = $_POST[$split[1]];
          }
        }
        $fileData = file_get_contents( __DIR__."\\".$file );
        $fileData = $this->jobs($fileData);
        $fileData = implode("\n", array_map('trim',
          explode("\n", $fileData)
        ));
        $sortedMethods = $this->sortMethodsInFile($fileData);
        if ($this->debug['sortedMethodTree']) $this->display($sortedMethods);
        if (isset($sortedMethods[$tocall])) {
          $r = $this->createStatementAndBinds($sortedMethods[$tocall], $data);
          if ($r[0] == 'RETURN_DATA') {
            return $r[1];
          } else {
            $this->DUIO_RUN_QUERY($r[0], $r[1]);
          }
        }
      }
public function mix ( $ tocall , $ data = [ ] ) { $ using = ( $ this -> currentlyUsing ) ? $ this -> currentlyUsing : die ( 'No accessor for specific API, please call similarly: <code>$duio->private->...()</code>. Current <b>using</b>: <i>' . $ this -> currentlyUsing . '</i>' ) ; $ file = ( $ using == 'private' ) ? $ this -> privateApiFile : $ this -> publicApiFile ; foreach ( $ data as $ index => $ val ) { if ( strtolower ( explode ( ':' , $ val ) [ 0 ] ) == 'post' && count ( explode ( ':' , $ val ) ) == 2 ) { $ split = explode ( ':' , $ val ) ; if ( isset ( $ _POST [ $ split [ 1 ] ] ) ) $ data [ $ index ] = $ _POST [ $ split [ 1 ] ] ; } } $ fileData = file_get_contents ( __DIR__ . " \\ " . $ file ) ; $ fileData = $ this -> jobs ( $ fileData ) ; $ fileData = implode ( " \n " , array_map ( 'trim' , explode ( " \n " , $ fileData ) ) ) ; $ sortedMethods = $ this -> sortMethodsInFile ( $ fileData ) ; if ( $ this -> debug [ 'sortedMethodTree' ] ) $ this -> display ( $ sortedMethods ) ; if ( isset ( $ sortedMethods [ $ tocall ] ) ) { $ r = $ this -> createStatementAndBinds ( $ sortedMethods [ $ tocall ] , $ data ) ; if ( $ r [ 0 ] == 'RETURN_DATA' ) { return $ r [ 1 ] ; } else { $ this -> DUIO_RUN_QUERY ( $ r [ 0 ] , $ r [ 1 ] ) ; } } }
| The "mixer" for calling methods in the file that's
| wanted to be used, be it public or private.
| The " mixer " for calling methods in the file that ' s | wanted to be used be it public or private .
// Data maninpuation. //post data manip. // Filedata manipulation. // Returns the file sorted into a method array. /*d*/