This file contains hidden or 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
| <?php | |
| /** | |
| * My Application bootstrap file. | |
| */ | |
| use Nette\Application\Routers\Route, | |
| Nette\Application\Routers\SimpleRouter; | |
| // Load Nette Framework |
This file contains hidden or 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
| <?php | |
| class Test { | |
| protected $a; // set called | |
| public $b; // nothing | |
| public $c = 1; // nothing | |
| public function __set($name, $value){ | |
| echo 'set called'; | |
| } |
This file contains hidden or 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
| <?php | |
| /** | |
| * Description of SitesGrid | |
| * | |
| * @author Michal Haták [Twista] <me@twista.cz> | |
| * @package cms | |
| */ | |
| class SitesGrid extends Nette\Application\UI\Control { |
This file contains hidden or 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
| public function createComponentGrid() { | |
| $grid = new SitesGrid($this->repo); | |
| return $grid; | |
| } |
This file contains hidden or 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
| if(preg_match_all('~filtr_([0-9]+)~', implode(' ', array_keys($_POST)) ,$out)){ | |
| if(isset($out[1])){ | |
| $filtrIds = array(); | |
| foreach (array_values($out[1]) as $value) { | |
| $filtrIds[] = preklicuj_pole_podle_dat($base->data_out('id_produkt','sprava_produktu_filtrovani_vazby_'.LAN,'id_filtr = '.$value.' AND hodnota = '.$_POST['filtr_'.$value].'','id_produkt'),'id_produkt'); | |
| } | |
| } | |
| $numOfFilters = count(array_keys($filtrIds)); | |
| $queryArr = array(); | |
| for ($i=0; $i < $numOfFilters; $i++) { |
This file contains hidden or 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
| class ExampleTest extends \PHPUnit_Framework_TestCase | |
| { | |
| public function setUp() | |
| { | |
| } | |
| public function testHelloWorld() | |
| { | |
| $this->assertEquals("hello", funkceCoVRACIHello()); // true |
This file contains hidden or 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
| <?php | |
| class PropertyAccess implements \ArrayAccess { | |
| public function offsetSet($offset, $value) { | |
| if(isset($this->offset)) | |
| $this->offset = $value; | |
| } | |
| public function offsetExists($offset) { |
This file contains hidden or 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
Show hidden characters
| { | |
| "cmd": ["phpunit", "-c","${project:${folder}}/phpunit.xml"], | |
| "encoding" : "utf-8", | |
| "selector" : "source.php", | |
| "shell" : true, | |
| "working_dir": "${project_path:${folder}}" | |
| } |
This file contains hidden or 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
| <?php | |
| /** | |
| * Description of site | |
| * | |
| * @author Michal Haták [Twista] <me@twista.cz> | |
| * @package cms | |
| */ | |
| class Site extends Nette\Object { |
This file contains hidden or 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
| /** | |
| * constructor | |
| * @param Nette\Database\Table\ActiveRow $row | |
| */ | |
| public function __construct(Nette\Database\Table\ActiveRow $row) { | |
| foreach ($row as $key => $value) { | |
| if (property_exists($this,$key)) | |
| $this->{$key} = $value; | |
| } | |
| } |
OlderNewer