<?php
/**
* This is an example of datetime handling where dates with different timezones are
* handled in the same application. But of course the server and database are fixed
* to a single matching timezone.
*/
function date_default_timezone_get__example($timezone = null)
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
query PerformanceCountByArtistId { | |
performances (filter: { artist: {eq: 2} year: {eq: 1995} } ) { | |
totalCount | |
} | |
} |
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
FROM php:8.1-apache | |
# Suppress warnings from apt about lack of Dialog | |
ENV DEBIAN_FRONTEND noninteractive | |
LABEL author="apiskeletons.com" \ | |
org.label-schema.docker.dockerfile="/Dockerfile" \ | |
org.label-schema.name="PHP using Apache" \ | |
org.label-schema.url="https://apiskeletons.com/" \ | |
org.label-schema.vcs-url="https://gist.github.com/TomHAnderson/a0e2455ede671997038b93086c930961" |
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
## | |
# Configure Server | |
# | |
# This script is to be ran on a fresh droplet from Digital Ocean to prep | |
# the droplet to host docker for api.etreedb.org. This is not necessary | |
# for installations where docker is already installed. | |
## | |
apt-get update | |
apt-get install -y apt-transport-https ca-certificates curl \ |
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
<script> | |
(function(i, s, o, g, r, a, m) { | |
i['GoogleAnalyticsObject'] = r; | |
i[r] = i[r] || function() { | |
(i[r].q = i[r].q || []).push(arguments) | |
}, i[r].l = 1 * new Date(); | |
a = s.createElement(o), | |
m = s.getElementsByTagName(o)[0]; | |
a.async = 1; | |
a.src = g; |
Directions in the Angular Style Guide read:
All of the app's code goes in a folder named src. All feature areas are in their own folder, with their own NgModule.
Angular Directory Structure is a talk, an application, and documentation detailing Angular application feature areas which may be applied piecemeal
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
public function convertToPHPValue($value, AbstractPlatform $platform) | |
{ | |
if ($value === null || $value instanceof DateTimeInterface) { | |
return $value; | |
} | |
$val = DateTime::createFromFormat('Y-m-d H:i:s.u', $value); | |
if (! $val) { | |
$val = date_create($value); |
namespace DbApi\Query\Provider\Source;
use ZF\Rest\ResourceEvent;
use DbApi\Query\Provider\AbstractQueryProvider;
use Db\Fixture\RoleFixture;
final class Patch extends AbstractQueryProvider
{
public function createQuery(ResourceEvent $event, $entityClass, $parameters)
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
class Module implements ApigilityProviderInterface | |
{ | |
public function onBootstrap(MvcEvent $e) | |
{ | |
$eventManager = $e->getApplication()->getEventManager(); | |
$sharedEventManager = $eventManager->getSharedManager(); | |
print_r($sharedEventManger);die('post shared event manager'); |
NewerOlder