Pinq\Expressions\Expression::cast PHP Method

cast() final public static method

final public static cast ( string $castType, Expression $castValue ) : CastExpression
$castType string
$castValue Expression
return CastExpression
    public static final function cast($castType, Expression $castValue)
    {
        return new CastExpression($castType, $castValue);
    }

Usage Example

コード例 #1
0
ファイル: ComplexParserTest.php プロジェクト: timetoogo/pinq
 /**
  * @dataProvider parsers
  */
 public function testNestedCastOperators()
 {
     $function = function () {
         (double) (object) (bool) (int) (string) $i;
     };
     $this->assertParsedAs($function, [O\Expression::cast(O\Operators\Cast::DOUBLE, O\Expression::cast(O\Operators\Cast::OBJECT, O\Expression::cast(O\Operators\Cast::BOOLEAN, O\Expression::cast(O\Operators\Cast::INTEGER, O\Expression::cast(O\Operators\Cast::STRING, self::variable('i'))))))]);
 }
All Usage Examples Of Pinq\Expressions\Expression::cast