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 | |
/** | |
* Create random string. | |
* | |
* @param int $length | |
* @return string | |
*/ | |
function getRandomSalt($length=8) | |
{ |
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 | |
interface ImaginaryCalendarFinderInterface | |
{ | |
/** | |
* @param int $year | |
* @param int $month | |
* @param int $day | |
* @return int | |
*/ |
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 | |
/** | |
* @param string $tagName | |
* @param string $content | |
*/ | |
function getTagContents($tagName, $content) | |
{ | |
preg_match_all(sprintf('#<%1$s[^>]+>(.*?)</%1$s>#ism', $tagName), $content, $match); | |
return isset($match[1]) ? $match[1] : array(); |
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 | |
namespace Application\Helper; | |
use Zend\View\Helper\AbstractHelper; | |
use Zend\View\Helper\FlashMessenger; | |
/** | |
* SemanticMessengerHelper class | |
* | |
* Register as plugin helper in application config: |
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
REM Created by Michal Zukowski (github.com/mikemix) | |
REM | |
REM Put this file inside ZF2_ROOT/bin directory for your convenience. | |
REM You are welcome. | |
REM | |
REM To make use of generated class map, configure your Module.php file as follows | |
REM | |
REM /** | |
REM * @return array | |
REM */ |
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 | |
namespace Common\Form\Delegator; | |
use Zend\ServiceManager\DelegatorFactoryInterface; | |
use Zend\ServiceManager\ServiceLocatorInterface; | |
use Zend\Validator\AbstractValidator; | |
class TranslatorDelegator | |
{ | |
public function createDelegatorWithName(ServiceLocatorInterface $serviceLocator, $name, $requestedName, $callback) |
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 User { | |
public function __construct($name) { | |
$this->name = $name; | |
} | |
public function getName() { | |
return $this->name; | |
} |
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 | |
namespace Module\Validator; | |
use Zend\Validator\Date; | |
class MyDateValidator extends Date | |
{ | |
public function isValid($value) | |
{ | |
$this->setValue($value); |
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 Person implements \JsonSerializable | |
{ | |
public function __construct($name, $surname) | |
{ | |
$this->name = $name; | |
$this->surname = $surname; | |
} | |
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 | |
interface JobInterface | |
{ | |
/** | |
* Czy wartość spełnia kryteria? | |
* | |
* @param mixed $value | |
* @return bool | |
*/ |
OlderNewer