What is OwnScript? ...you might ask. OwnScript is a programming language based on good parts of specific other languages, namely PHP, JavaScript, Java, Ruby and C#
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
{{ACTION}} = Die Aktion, die die PHP API empfangen soll | |
{{METHOD}} = Die HTTP Request Method (Meist GET für lesen, POST für schreiben) | |
{{GET_DATEN}} = Die GET Daten im Query String Format | |
{{POST_DATEN}} = Die POST Daten im Query String Format | |
//prepar request | |
NSString *urlString = [NSString stringWithFormat:@"http://deineurl.com/api.php?action={{ACTION}}&{{GET_DATEN}}"]; | |
NSMutableURLRequest *request = [[[NSMutableURLRequest alloc] init] autorelease]; | |
[request setURL:[NSURL URLWithString:urlString]]; |
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 | |
/* | |
* Die Daten in $_GET befinden sich in der URL | |
* http://meine-domain.com/api.php?action=test&nocheins=test2 | |
* Hier ist | |
* $_GET[ 'action' ] === 'test' | |
* $_GET[ 'nocheins' ] === 'test2' | |
* | |
* Die Daten vom POST request befinden sich im Request Body |
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 Type { | |
protected $value; | |
public function __construct( $value ) { $this->value = $value; } | |
abstract public function __cast( /* (string) Class name */ $type ); | |
} |
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 Dwarf; | |
class Path extends Object implements \IteratorAggregate, \Countable { | |
protected $path; | |
public function __construct( $path ) { | |
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 | |
//Signature: array array_column ( array $input , mixed $column_key [, mixed $index_key ] ) | |
if( !function_exists( 'array_column' ) ): | |
function array_column( array $input, $column_key, $index_key = null ) { | |
$result = array(); | |
foreach( $input as $k => $v ) | |
$result[ $index_key ? $v[ $index_key ] : $k ] = $v[ $column_key ]; |
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
<!-- This will produce a CORS error (expected) --> | |
<!--<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.0.0/jquery.min.js"></script>--> | |
<element name="x-jquery"> | |
<!-- This will produce a CORS error (expected) --> | |
<!--<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.0.0/jquery.min.js"></script>--> | |
<template> | |
<!-- This won't load at all, even with content in the element --> | |
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.0.0/jquery.min.js"></script> | |
NewerOlder