コード例 #1
0
ファイル: Ctrl.Installer.php プロジェクト: markhj/bytes
 /**
  * Show the end user what we're intending to do
  *
  * @access public
  * @return string
  */
 public function ShowIntentions(\Bytes\GlobalScope $GlobalScope) : string
 {
     /* ------------------------------------------------------------------------------------------------------
           CREATE VISUAL
        ------------------------------------------------------------------------------------------------------ */
     $Visual = $this->Visual('InstallerOutput');
     /* ------------------------------------------------------------------------------------------------------
           OUTPUT
        ------------------------------------------------------------------------------------------------------ */
     if ($GlobalScope->GET('Confirm') === '1') {
         $Visual->Embed('Output', $this->Model('DatabaseQueryRunner')->RunQueries($this->GetIntentions()['Queries']));
     } else {
         $Output = $this->GetIntentions();
         $Visual->Embed('Output', $Output['Queries']);
         $Visual->Embed('Descriptions', $Output['Descriptions']);
     }
     /* ------------------------------------------------------------------------------------------------------
           RETURN
        ------------------------------------------------------------------------------------------------------ */
     return $Visual->Render();
 }
コード例 #2
0
ファイル: Ctrl.Index.php プロジェクト: markhj/bytes
 /**
  * Ajax DELETE
  *
  * @access public
  * @return array
  */
 public function AjaxDELETE(\Bytes\GlobalScope $Data) : array
 {
     /* ------------------------------------------------------------------------------------------------------
           RETURN
        ------------------------------------------------------------------------------------------------------ */
     return ['Return' => 'DELETE ' . $Data->DELETE('Input')];
 }