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 | |
/** | |
* Glitch | |
* | |
* Copyright (c) 2010, Enrise BV (www.enrise.com). | |
* All rights reserved. | |
* | |
* Redistribution and use in source and binary forms, with or without | |
* modification, are permitted provided that the following conditions | |
* are met: |
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 | |
/** | |
* Glitch | |
* | |
* Copyright (c) 2010, Enrise BV (www.enrise.com). | |
* All rights reserved. | |
* | |
* Redistribution and use in source and binary forms, with or without | |
* modification, are permitted provided that the following conditions | |
* are met: |
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 | |
/** | |
* Glitch | |
* | |
* Copyright (c) 2010, Enrise BV (www.enrise.com). | |
* All rights reserved. | |
* | |
* Redistribution and use in source and binary forms, with or without | |
* modification, are permitted provided that the following conditions | |
* are met: |
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 Application_Model_Form_Html5 extends Zend_Form | |
{ | |
public function init() | |
{ | |
$email = new Glitch_Form_Element_Text_Email('email'); | |
$email->setLabel('Email'); | |
$url = new Glitch_Form_Element_Text_Url('url'); | |
$url->setLabel('Url'); |
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 FilterAdapter | |
{ | |
public function filter($value); | |
} | |
class FilterBase | |
{ | |
protected $_adapter; |
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
RewriteEngine On | |
RewriteBase / | |
# DO match the following url(s) | |
SetEnvIf Request_URI ^(?!<insertYourUrlHere>$) noauth=1 | |
# the auth block | |
AuthName "Please login." | |
AuthType Basic | |
AuthUserFile <insertYourPasswordFileHere> |
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 | |
$keys = array_filter(array_keys($_SERVER), function($v) { return 0 === strpos($v, 'HTTP_'); }); | |
$keys = array_combine($keys, $keys); | |
$headers = array_intersect_key($_SERVER, $keys); | |
var_dump($headers); |
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 mixed $input | |
* @param null|callable $callback | |
* @return array | |
*/ | |
function array_filter_recursive($input, $callback = null) { | |
if (!is_array($input)) { | |
return $input; | |
} |