Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #19 from znframework/5.8
Added Form/Html::__toString() method.
- Loading branch information
Showing
5 changed files
with
100 additions
and
46 deletions.
There are no files selected for viewing
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,40 @@ | ||
<?php namespace ZN\Hypertext; | ||
/** | ||
* ZN PHP Web Framework | ||
* | ||
* "Simplicity is the ultimate sophistication." ~ Da Vinci | ||
* | ||
* @package ZN | ||
* @license MIT [http://opensource.org/licenses/MIT] | ||
* @author Ozan UYKUN [ozan@znframework.com] | ||
*/ | ||
|
||
|
||
trait OutputElements | ||
{ | ||
/** | ||
* Protected output element | ||
* | ||
* @var string | ||
*/ | ||
protected $outputElement = NULL; | ||
|
||
/** | ||
* Magic to string | ||
* | ||
* @return string | ||
*/ | ||
public function __toString() | ||
{ | ||
if( $outputElement = ($this->outputElement ?? NULL) ) | ||
{ | ||
$this->outputElement = NULL; | ||
|
||
return $outputElement; | ||
} | ||
elseif( $this->getBootstrapGridsystem() ) | ||
{ | ||
return $this->createBootstrapGridsystem(); | ||
} | ||
} | ||
} |
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