A class name can be in one of the following formats:
- Unqualified class name (UCN)
/** | |
* Taken from Nikita Popov's answer on stack overflow: http://stackoverflow.com/questions/16489509/decrypting-aes-ctr-little-endian-with-php | |
*/ | |
static public function ctr_crypt($str, $cipher = MCRYPT_RIJNDAEL_256, $key, $iv) { | |
$numOfBlocks = ceil(strlen($str) / 16); | |
$ctrStr = ''; | |
for ($i = 0; $i < $numOfBlocks; ++$i) { | |
$ctrStr .= $iv; |
A basic datastructure is defined as:
<datastructure>[<elementlist>]
import saffire; | |
import http::request; | |
import saffire::sapi; | |
class http { | |
protected property sapi = null; | |
public method detectSapi() { | |
switch (saffire.sapi()) { | |
case "fastcgi" : |
/usr/share/saffire/modules | |
/usr/share/saffire/modules/sfl | |
/usr/share/saffire/modules/sfl/io.sf | |
/usr/share/saffire/modules/sfl/saffire.sf | |
/usr/share/saffire/modules/Framework.sf | |
/usr/share/saffire/modules/Framework | |
/usr/share/saffire/modules/Framework/View.sf | |
/usr/share/saffire/modules/Framework/Http.sf |
diff --git a/src/components/compiler/saffire.y b/src/components/compiler/saffire.y | |
index 1d9ff12..06702b8 100644 | |
--- a/src/components/compiler/saffire.y | |
+++ b/src/components/compiler/saffire.y | |
@@ -95,7 +95,7 @@ | |
%token T_CATCH "catch" T_BREAK "break" T_GOTO "goto" T_BREAKELSE "breakelse" | |
%token T_CONTINUE "continue" T_THROW "throw" T_RETURN "return" T_FINALLY "finally" | |
%token T_TRY "try" T_DEFAULT "default" T_METHOD "method" | |
-%token T_SELF "self" T_PARENT "parent" T_NS_SEP T_TO | |
+%token T_SELF "self" T_PARENT "parent" T_NS_SEP "::" T_TO |
namespace eval moin { | |
bind pubm -|- * moin::moin | |
} | |
proc moin::moin { nick host handle chan text } { | |
if {[regexp -nocase -- {(^moin|^mornin)} $text]} { | |
putserv "PRIVMSG $chan :$nick moin" | |
} | |
if {[regexp -nocase -- {(^:\)|^:P)} $text]} { |
namespace eval moin { | |
bind pubm -|- * moin::moin | |
} | |
proc moin::moin { nick host handle chan text } { | |
if {[regexp -nocase -- {(^moin|^mornin)} $text]} { | |
putserv "PRIVMSG $chan :$nick moin" | |
} | |
} |
<?php | |
class MyIni { | |
protected $file; | |
protected $section_endings; | |
protected $keys; | |
function __construct($filename) { | |
$this->file = file($filename); | |
$this->_parse(); |
<?php | |
namespace Acme\DemoBundle\Entity; | |
use Doctrine\ORM\Mapping as ORM; | |
/** | |
* @ORM\Entity | |
* @ORM\Table(name="Foo", uniqueConstraints={ | |
@ORM\UniqueConstraint(name="fullname",columns={"firstname", "lastname"}), |