Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
<?php | |
class BetterXMLElement extends SimpleXMLElement { | |
//appends this xml to a parent | |
public function appendToSimpleXML(SimpleXMLElement $parent) { | |
$toDom = dom_import_simplexml($parent); | |
$fromDom = dom_import_simplexml($this); | |
$toDom->appendChild($toDom->ownerDocument->importNode($fromDom, true)); | |
} |
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
<?php | |
/** | |
* Plugin Name: JSON API - Media Controller | |
* Version: 0.0.1 | |
* Author: Eric Mulder | |
* Author URI: https://emdevelopment.nl | |
* Plugin URI: https://emdevelopment.nl | |
* Description: Extensions to the JSON API plugin, to enable file upload | |
* Licence: GPLv2+ | |
*/ |
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
//How to sort the following list? | |
//Array with NSStrings: | |
[NSArray arrayWithObjects:@"0.0 Title", @"1.1 Title", @"1.10 Title", @"1.11 Title", @"1.12 Title", @"1.2 Title", @"10.1 Title",@"10.11 Title",@"10.2 Title",@"2.1 Title", nil]; | |
Solution: | |
NSSortDescriptor *sortDescriptor; | |