Skip to content

Latest commit

 

History

History
12 lines (10 loc) · 308 Bytes

object_exists.md

File metadata and controls

12 lines (10 loc) · 308 Bytes

object_exists()

Checks the object existence.

object_exists($className, $criteria = null)

  • $className (string) - class name.
  • $criteria (integer|string|array) - Criteria to check.
if (if (object_exists('Ticket', array('published'=>0))) {
    // At least one unpublished ticket exists
}