コード例 #1
0
ファイル: FormattingTest.php プロジェクト: genkgo/xsl
 public function testInvalidSequence()
 {
     $this->setExpectedException(InvalidArgumentException::class, 'Expected a http://www.w3.org/2001/XMLSchema:dateTime object, got xs:item');
     $xsDateTime = XsDateTime::fromString('2015-10-16 15:37:00');
     $this->transformFile('Stubs/Xsl/Formatting/format-invalid-sequence.xsl', ['dateTime' => (string) $xsDateTime, 'picture' => '[Y]']);
 }
コード例 #2
0
ファイル: Functions.php プロジェクト: Samshal/xsl
 /**
  * @param $value
  * @return XsDateTime
  */
 public static function xsDateTime($value)
 {
     $value = XsDateTime::castToNodeValue($value);
     return XsDateTime::fromString($value);
 }