isPasswordProtected() public method

isPasswordProtected
public isPasswordProtected ( $padID )
コード例 #1
0
    $instance->setPublicStatus('testPad', true);
    // true or false
} catch (Exception $e) {
    // the pad already exists or something else went wrong
    echo "\n\nsetPublicStatus Failed with message " . $e->getMessage();
}
/* Example: Set Password on a pad -- This only works for group pads */
try {
    $instance->setPassword('testPad', 'aPassword');
} catch (Exception $e) {
    // the pad already exists or something else went wrong
    echo "\n\nsetPassword Failed with message " . $e->getMessage();
}
/* Example: Get true/false if the pad is password protected and include some logic -- This only works for group pads*/
try {
    $isPasswordProtected = $instance->isPasswordProtected('testPad');
    if ($isPasswordProtected->isPasswordprotected === false) {
        echo "Pad is not password protected\n\n";
    } else {
        echo "Pad is password protected\n\n";
    }
} catch (Exception $e) {
    // the pad already exists or something else went wrong
    echo "\n\nisPasswordProtected Failed with message " . $e->getMessage();
}
/* Example: Get revisions Count of a pad */
try {
    $revisionCount = $instance->getRevisionsCount('testPad');
    $revisionCount = $revisionCount->revisions;
    echo "Pad has {$revisionCount} revisions\n\n";
} catch (Exception $e) {