-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
18 changed files
with
913 additions
and
179 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<?php | ||
|
||
namespace Tqdev\PhpCrudUi\Document; | ||
|
||
class JsonDocument | ||
{ | ||
private $variables; | ||
|
||
public function __construct(array $variables) | ||
{ | ||
$this->variables = $variables; | ||
} | ||
|
||
public function __toString(): string | ||
{ | ||
return json_encode($this->variables['records']); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<?php | ||
|
||
namespace Tqdev\PhpCrudUi\Document; | ||
|
||
class RedirectDocument | ||
{ | ||
private $path; | ||
private $variables; | ||
|
||
public function __construct(string $path, array $variables) | ||
{ | ||
$this->path = $path; | ||
$this->variables = $variables; | ||
} | ||
|
||
public function addVariables(array $variables) /*: void*/ | ||
{ | ||
$this->variables = array_merge($variables, $this->variables); | ||
} | ||
|
||
public function __toString(): string | ||
{ | ||
return $this->variables['base'] . $this->path; | ||
} | ||
} |
Oops, something went wrong.