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 | |
// string dataType | |
$parse->bio = "I am a PHP developer"; | |
// number dataType | |
$parse->age = 29; | |
// pointer to User class | |
$parse->userId = $parse->dataType( 'pointer', array( '_User', $user_id ) ); |
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
// string dataType | |
profile.set( 'bio', 'I am a PHP developer' ); | |
// number dataType | |
profile.set( 'age', 29 ); | |
// pointer to User class | |
profile.set( "userId", { "__type": "Pointer", "className": "_User", "objectId": Parse.User.current().id } ); | |
// pointer to custom class |
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 | |
// true = access allowed, false = not allowed | |
// create ACL | |
$acl = new parseACL(); | |
// public can read | |
$acl->setPublicReadAccess( true ); | |
// public cannot write |
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
// true = access allowed, false = not allowed | |
// create ACL | |
var acl = new Parse.ACL(); | |
// public can read | |
acl.setPublicReadAccess( true ); | |
// public cannot write | |
acl.setPublicWriteAccess( false ); | |
// user can read data |
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 | |
/** | |
* You only need this file if you are not using composer. | |
* Adapted from the Facebook PHP SDK 4.0.x autoloader | |
*/ | |
if (version_compare(PHP_VERSION, '5.4.0', '<')) { | |
throw new Exception('The Parse SDK requires PHP version 5.4 or higher.'); | |
} |
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 | |
// define location of Parse PHP SDK, e.g. location in "Parse" folder | |
// Defaults to ./Parse/ folder. Add trailing slash | |
define( 'PARSE_SDK_DIR', './Parse/' ); | |
// include Parse SDK autoloader | |
require_once( 'autoload.php' ); | |
// Add the "use" declarations where you'll be using the classes |
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
# === SVN === # | |
# find .svn folders in current directory | |
find . -name .svn -exec echo {} \; | |
# delete .svn folders in current directory | |
find . -name .svn -exec rm -rfv {} \; | |
# === GIT === # |
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
# Find PHP files in current directory | |
find . -name *.php -exec echo {} \; | |
# Find annoying .DS_Store files in current directory (Mac issue) | |
find . -name .DS_Store -exec echo {} \; | |
# Find log files in current directory (ending in.log) | |
find . -name *.log -exec echo {} \; |
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
<div id="cc-map"></div> | |
<!-- uses latest version of jQuery (v2.1.1) --> | |
<script src="http://www.cagecricket.com/wp-content/plugins/cage-cricket/map-embed.php"></script> | |
<!-- jQuery-less version --> | |
<script src="http://www.cagecricket.com/wp-content/plugins/cage-cricket/map-embed.php?jquery=false"></script> |
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 | |
// using https://github.com/apotropaic/parse.com-php-library PHP Parse Library | |
require_once( 'Parse/parse.php' ); | |
$query = new parseQuery('TestClass'); | |
// hack to get all results | |
$query->whereNotEqualTo( 'name', 'foo' ); |